示例#1
0
 public function testShouldNotAcceptMaliciousModuleNames()
 {
     AetherModuleFactory::$strict = false;
     AetherModuleFactory::$path = __DIR__ . '/fixtures/modules';
     $this->setExpectedException('AetherInvalidModuleNameException');
     $mod = AetherModuleFactory::create('../sections/Testsection', new AetherServiceLocator(), []);
 }
示例#2
0
 public function testCreateModuleFromCustomFolder()
 {
     $dir = dirname(__FILE__) . '/';
     AetherModuleFactory::$strict = false;
     AetherModuleFactory::$path = $dir;
     $mod = AetherModuleFactory::create('Hellolocal', new AetherServiceLocator(), array('foo' => 'bar'));
     $this->assertEquals($mod->run(), 'Hello local');
 }