コード例 #1
0
 public function testManger()
 {
     $this->assertInstanceOf('\\HelloWordPl\\SimpleEntityGeneratorBundle\\Lib\\Interfaces\\RenderableInterface', $this->classManager);
     $this->assertInstanceOf('\\HelloWordPl\\SimpleEntityGeneratorBundle\\Lib\\Items\\ClassManager', $this->classManager);
     $this->assertInstanceOf('\\HelloWordPl\\SimpleEntityGeneratorBundle\\Lib\\Interfaces\\StructureWithMethodsInterface', $this->classManager);
     $this->assertInstanceOf('\\HelloWordPl\\SimpleEntityGeneratorBundle\\Lib\\Interfaces\\DumpableInterface', $this->classManager);
     $this->assertEquals("User entity for tests", $this->classManager->getComment());
     $this->assertEquals("\\AppBundle\\Entity\\User", $this->classManager->getNamespace());
     $this->assertEquals("\\AppBundle\\Entity", $this->classManager->getNamespaceWithoutName());
     $this->assertEquals("AppBundle\\Entity", $this->classManager->getNamespaceWithoutNameAndBackslashPrefix());
     $this->assertEquals("User", $this->classManager->getName());
     $this->assertEquals("/AppBundle/Entity", $this->classManager->getDirectory());
     $this->assertTrue($this->classManager->hasInterface());
     $this->assertTrue($this->classManager->hasTestClass());
 }