public function testDirectoryParameter() { try { new DirectoryParameter(null); } catch (\Exception $E) { $this->assertInstanceOf('MOC\\V\\Core\\AutoLoader\\Component\\Exception\\Repository\\EmptyDirectoryException', $E); } $Parameter = new DirectoryParameter(__DIR__); $this->assertEquals(__DIR__, $Parameter->getDirectory()); try { $Parameter->setDirectory('MOC\\V\\TestSuite'); } catch (\Exception $E) { $this->assertInstanceOf('MOC\\V\\Core\\AutoLoader\\Component\\Exception\\Repository\\DirectoryNotFoundException', $E); } }
/** * @param NamespaceParameter $NamespaceParameter * @param DirectoryParameter $DirectoryParameter * @param NamespaceParameter $PrefixParameter */ function __construct(NamespaceParameter $NamespaceParameter, DirectoryParameter $DirectoryParameter, NamespaceParameter $PrefixParameter = null) { $this->Instance = new NamespaceLoader($NamespaceParameter->getNamespace(), $DirectoryParameter->getDirectory(), null === $PrefixParameter ? null : $PrefixParameter->getNamespace()); }
/** * @param NamespaceParameter $Namespace * @param DirectoryParameter $Directory * * @return IBridgeInterface */ public function addNamespaceDirectoryMapping(NamespaceParameter $Namespace, DirectoryParameter $Directory) { $this->Instance->addNamespaceMapping($Namespace->getNamespace(), $Directory->getDirectory()); return $this; }