PopTest\Code\ClassTest::testAddGetAndRemoveProperty PHP Метод

testAddGetAndRemoveProperty() публичный Метод

    public function testAddGetAndRemoveProperty()
    {
        $c = ClassGenerator::factory('TestClass');
        $c->addProperty(new PropertyGenerator('testProp', 'string', 'This is a test string'));
        $this->assertEquals('testProp', $c->getProperty('testProp')->getName());
        $this->assertEquals(1, count($c->getProperties()));
        $c->removeProperty('testProp');
        $this->assertNull($c->getProperty('testProp'));
    }