public function testShouldNotAcceptMaliciousModuleNames() { AetherModuleFactory::$strict = false; AetherModuleFactory::$path = __DIR__ . '/fixtures/modules'; $this->setExpectedException('AetherInvalidModuleNameException'); $mod = AetherModuleFactory::create('../sections/Testsection', new AetherServiceLocator(), []); }
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'); }