Esempio n. 1
0
 public function testProcess()
 {
     $env = new Environment('tests/support/assets');
     $env->register('test', 'Sherlock\\Test\\TestEngine');
     $asset = new Asset('', $env);
     $asset->extension = 'test';
     $asset->content = 'Hello World';
     $asset->process();
     $this->assertEquals('---TEST---Hello World---TEST---', $asset->content);
 }
Esempio n. 2
0
 public function testRegisterWithIncorrectEngine()
 {
     $this->setExpectedException('Sherlock\\Exceptions\\InvalidEngine');
     $env = new Environment();
     $env->register('weird', 'Sherlock\\Engines\\WeirdEngine');
 }