/**
  * @covers \DCarbone\PHPClassBuilder\Template\Structure\InterfaceTemplate::__construct
  * @covers \DCarbone\PHPClassBuilder\Template\Structure\InterfaceTemplate::setNamespace
  * @depends testCanConstructWithValidNameArgument
  */
 public function testCanConstructWithValidNamespaceArgument()
 {
     $ns = 'MyAwesome\\NS';
     $int = new InterfaceTemplate(null, $ns);
     $this->assertEquals($ns, $int->getNamespace());
 }
Exemplo n.º 2
0
 /**
  * @param InterfaceTemplate|string $interface
  */
 public function addInterface($interface)
 {
     if ($interface instanceof InterfaceTemplate) {
         $this->_interfaces[$interface->getName()] = $interface;
     } else {
         $this->_interfaces[$interface] = $interface;
     }
 }