Changeset 18915
- Timestamp:
- 06/04/09 14:37:33 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfXssSafePlugin/branches/1.2/test/unit/XssSafeTest.php
r18693 r18915 1 1 <?php 2 3 // initializes testing framework 4 $app = 'frontend'; 5 $sf_root = dirname(__FILE__).'/../../../..'; 6 require_once($sf_root.'/lib/symfony/vendor/lime/lime.php'); 7 include($sf_root.'/test/bootstrap/functional.php'); 2 3 // initializes testing framework [sf 1.2] 4 require_once(dirname(__FILE__).'/../../../../test/bootstrap/unit.php'); 8 5 9 6 // add filters to the default configuration … … 63 60 'src*' => 'URI', 64 61 'flashvars' => 'Text', 65 'allowscriptaccess' => 'Enum#never',62 /*'allowscriptaccess' => 'Enum#never',*/ 66 63 'enablejsurls' => 'Enum#false', 67 64 'enablehref' => 'Enum#false', 65 'allowfullscreen' => 'Text', 68 66 'bgcolor' => 'Text', 69 67 'align' => 'Text', … … 382 380 'input' => '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="video_small" align="middle" height="370" width="417"> 383 381 <param name="allowScriptAccess" value="sameDomain"> 384 <param name="allowFullScreen" value=" false">382 <param name="allowFullScreen" value="true"> 385 383 <param name="FlashVars" value="video=http://www.toppeo.com/flv/demospectacle4473EE7B_8003221.flv"> 386 384 <param name="movie" value="/player/player.swf"><param name="quality" value="high"> 387 385 <param name="bgcolor" value="#000000"> 388 <embed src="/player/player.swf" flashvars="video=http://www.toppeo.com/flv/demospectacle4473EE7B_8003221.flv" quality="high" bgcolor="#000000" name="video_small" allowscriptaccess="sameDomain" allowfullscreen=" false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="370" width="417">386 <embed src="/player/player.swf" flashvars="video=http://www.toppeo.com/flv/demospectacle4473EE7B_8003221.flv" quality="high" bgcolor="#000000" name="video_small" allowscriptaccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="370" width="417"> 389 387 </object>', 390 'output' => '<embed src="/player/player.swf" flashvars="video=http://www.toppeo.com/flv/demospectacle4473EE7B_8003221.flv" quality="high" bgcolor="#000000" name="video_small" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="370" width="417" enablejsurls="false" enablehref="false" allowfullscreen="true" />',388 'output' => '<embed src="/player/player.swf" flashvars="video=http://www.toppeo.com/flv/demospectacle4473EE7B_8003221.flv" quality="high" bgcolor="#000000" name="video_small" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="370" width="417" allowscriptaccess="never" enablejsurls="false" enablehref="false" />', 391 389 'filter' => true 392 390 ) … … 398 396 $t->diag('XssSafe Helper'); 399 397 $t->include_ok(sfConfig::get('sf_plugins_dir').'/sfXssSafePlugin/lib/helper/XssSafeHelper.php', 'XssSafe Helper include'); 400 $t->i nclude_ok(sfConfig::get('sf_plugins_dir').'/sfXssSafePlugin/lib/vendor/htmlpurifier/HTMLPurifier.auto.php', 'HTML Purifier include');398 $t->is(class_exists('HTMLPurifier_Config'), true, 'HTML Purifier autoload'); 401 399 402 400 // XSS Attacks Smoketest plugins/sfXssSafePlugin/trunk/test/unit/XssSafeTest.php
r18911 r18915 1 1 <?php 2 2 3 /** 4 * Unit tests for Sf 1.0 5 */ 6 7 // initializes testing framework 8 $sf_root = dirname(__FILE__).'/../../../..'; 9 require_once($sf_root.'/lib/symfony/vendor/lime/lime.php'); 10 include($sf_root.'/test/bootstrap/functional.php'); 3 // initializes testing framework [sf 1.2] 4 require_once(dirname(__FILE__).'/../../../../test/bootstrap/unit.php'); 11 5 12 6 // add filters to the default configuration … … 402 396 $t->diag('XssSafe Helper'); 403 397 $t->include_ok(sfConfig::get('sf_plugins_dir').'/sfXssSafePlugin/lib/helper/XssSafeHelper.php', 'XssSafe Helper include'); 404 $t->i nclude_ok(sfConfig::get('sf_plugins_dir').'/sfXssSafePlugin/lib/vendor/htmlpurifier/HTMLPurifier.auto.php', 'HTML Purifier include');398 $t->is(class_exists('HTMLPurifier_Config'), true, 'HTML Purifier autoload'); 405 399 406 400 // XSS Attacks Smoketest