Changeset 17711
- Timestamp:
- 04/28/09 15:26:45 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/test/unit/config/sfViewConfigHandlerTest.php
r7812 r17711 11 11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 12 13 $t = new lime_test(2 0, new lime_output_color());13 $t = new lime_test(22, new lime_output_color()); 14 14 15 15 class myViewConfigHandler extends sfViewConfigHandler … … 44 44 $handler->setConfiguration(array( 45 45 'myView' => array( 46 'javascripts' => array('foobar'), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addJavascript('foobar', '', array ()); 46 'stylesheets' => array(array('foobar' => array('position' => 'last'))), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addStylesheet('foobar', 'last', array ()); 51 52 EOF; 53 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds stylesheets to the response'); 54 55 $handler->setConfiguration(array( 56 'myView' => array( 57 'javascripts' => array('foobar'), 58 ), 59 )); 60 $content = <<<EOF 61 \$response->addJavascript('foobar', '', array ()); 62 63 EOF; 64 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds JavaScript to the response'); 65 66 $handler->setConfiguration(array( 67 'myView' => array( 68 'javascripts' => array(array('foobar' => array('position' => 'last'))), 69 ), 70 )); 71 $content = <<<EOF 72 \$response->addJavascript('foobar', 'last', array ()); 51 73 52 74 EOF; branches/1.2/test/unit/config/sfViewConfigHandlerTest.php
r7812 r17711 11 11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 12 13 $t = new lime_test(2 0, new lime_output_color());13 $t = new lime_test(22, new lime_output_color()); 14 14 15 15 class myViewConfigHandler extends sfViewConfigHandler … … 44 44 $handler->setConfiguration(array( 45 45 'myView' => array( 46 'javascripts' => array('foobar'), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addJavascript('foobar', '', array ()); 46 'stylesheets' => array(array('foobar' => array('position' => 'last'))), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addStylesheet('foobar', 'last', array ()); 51 52 EOF; 53 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds stylesheets to the response'); 54 55 $handler->setConfiguration(array( 56 'myView' => array( 57 'javascripts' => array('foobar'), 58 ), 59 )); 60 $content = <<<EOF 61 \$response->addJavascript('foobar', '', array ()); 62 63 EOF; 64 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds JavaScript to the response'); 65 66 $handler->setConfiguration(array( 67 'myView' => array( 68 'javascripts' => array(array('foobar' => array('position' => 'last'))), 69 ), 70 )); 71 $content = <<<EOF 72 \$response->addJavascript('foobar', 'last', array ()); 51 73 52 74 EOF; branches/1.3/test/unit/config/sfViewConfigHandlerTest.php
r7812 r17711 11 11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 12 13 $t = new lime_test(2 0, new lime_output_color());13 $t = new lime_test(22, new lime_output_color()); 14 14 15 15 class myViewConfigHandler extends sfViewConfigHandler … … 44 44 $handler->setConfiguration(array( 45 45 'myView' => array( 46 'javascripts' => array('foobar'), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addJavascript('foobar', '', array ()); 46 'stylesheets' => array(array('foobar' => array('position' => 'last'))), 47 ), 48 )); 49 $content = <<<EOF 50 \$response->addStylesheet('foobar', 'last', array ()); 51 52 EOF; 53 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds stylesheets to the response'); 54 55 $handler->setConfiguration(array( 56 'myView' => array( 57 'javascripts' => array('foobar'), 58 ), 59 )); 60 $content = <<<EOF 61 \$response->addJavascript('foobar', '', array ()); 62 63 EOF; 64 $t->is(fix_content($handler->addHtmlAsset('myView')), fix_content($content), 'addHtmlAsset() adds JavaScript to the response'); 65 66 $handler->setConfiguration(array( 67 'myView' => array( 68 'javascripts' => array(array('foobar' => array('position' => 'last'))), 69 ), 70 )); 71 $content = <<<EOF 72 \$response->addJavascript('foobar', 'last', array ()); 51 73 52 74 EOF;