public function setUp()
 {
     $this->Env = AssetEnvironment::getInstance(App::pluginPath('Asset') . DS . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
     $this->Asset = $this->getMock('CssAsset', array(), array('url', 'file'));
     $this->Context = $this->getMock('AssetContext');
     $this->Processor = new AssetProcessor($this->Asset, $this->Context);
 }
 public function testGetInstanceWithInstance()
 {
     $instance = AssetEnvironment::getInstance($this->path);
     $result = AssetEnvironment::getInstance($instance);
     $this->assertInstanceOf('AssetEnvironment', $result);
     $this->assertSame($instance, $result);
     $this->assertNotSame(AssetEnvironment::getInstance(), $result);
 }
Beispiel #3
0
 public function __construct($url, $file, $env = null)
 {
     $this->url = $url;
     $this->file = $file;
     $this->env = AssetEnvironment::getInstance($env);
 }
 public function setUp()
 {
     $this->env = AssetEnvironment::getInstance(App::pluginPath('Asset') . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
     $this->Dispatcher = new AssetsDispatcher($this->env);
 }
 public function __construct($env = null)
 {
     $this->_env = AssetEnvironment::getInstance($env);
 }