Esempio n. 1
0
 public function testSetGetProperties()
 {
     $class = new PhpClass();
     $this->assertEquals(array(), $class->getProperties());
     $this->assertSame($class, $class->setProperties($props = array('foo' => new PhpProperty())));
     $this->assertSame($props, $class->getProperties());
     $this->assertSame($class, $class->setProperty($prop = new PhpProperty('foo')));
     $this->assertSame(array('foo' => $prop), $class->getProperties());
     $this->assertTrue($class->hasProperty('foo'));
     $this->assertSame($class, $class->removeProperty('foo'));
     $this->assertEquals(array(), $class->getProperties());
 }