@@ -29,7 +29,7 @@ public function setUp()
2929 $ request = new Request ();
3030
3131 $ view = new View ($ controller );
32- $ view ->request = $ request ;
32+ $ view ->setRequest ( $ request) ;
3333 $ this ->Helper = new AssetCompressHelper ($ view , ['noconfig ' => true ]);
3434 $ config = AssetConfig::buildFromIniFile ($ testFile , [
3535 'TEST_FILES ' => APP ,
@@ -117,7 +117,7 @@ public function testBaseUrl()
117117 */
118118 public function testDefinedBuildWithThemeNoBuiltAsset ()
119119 {
120- $ this ->Helper ->theme = ' blue ' ;
120+ $ this ->Helper ->getView ()-> setTheme ( ' Blue ' ) ;
121121 $ config = $ this ->Helper ->assetConfig ();
122122 $ config ->addTarget ('themed.js ' , [
123123 'theme ' => true ,
@@ -126,7 +126,7 @@ public function testDefinedBuildWithThemeNoBuiltAsset()
126126 $ result = $ this ->Helper ->script ('themed.js ' );
127127 $ expected = [
128128 ['script ' => [
129- 'src ' => '/cache_js/themed.js?theme=blue '
129+ 'src ' => '/cache_js/themed.js?theme=Blue '
130130 ]]
131131 ];
132132 $ this ->assertHtml ($ expected , $ result );
@@ -195,7 +195,7 @@ public function testUrlGenerationProductionModePluginIni()
195195 */
196196 public function testRawAssetsPlugin ()
197197 {
198- Plugin:: load ( 'TestAsset ' );
198+ $ this -> loadPlugins ([ 'TestAsset ' ] );
199199
200200 $ config = AssetConfig::buildFromIniFile ($ this ->_testFiles . 'config/plugins.ini ' );
201201 $ config ->paths ('css ' , null , [
@@ -249,10 +249,10 @@ public function testCompiledBuildWithThemes()
249249 'theme ' => true
250250 ]);
251251
252- $ this ->Helper ->theme = ' blue ' ;
252+ $ this ->Helper ->getView ()-> setTheme ( ' Blue ' ) ;
253253 $ result = $ this ->Helper ->script ('asset_test.js ' );
254254 $ result = str_replace ('/ ' , DS , $ result );
255- $ this ->assertContains ('blue -asset_test.js ' , $ result );
255+ $ this ->assertContains ('Blue -asset_test.js ' , $ result );
256256 }
257257
258258 /**
@@ -484,7 +484,7 @@ public function testInlineScript()
484484 */
485485 public function testNoConflictWithPluginName ()
486486 {
487- Plugin:: load ( 'Blue ' );
487+ $ this -> loadPlugins ([ 'Blue ' ] );
488488
489489 $ result = $ this ->Helper ->script ('blue-app.js ' , ['raw ' => true ]);
490490 $ expected = [
0 commit comments