Пример #1
0
 /**
  * Test if the `getProperties` method returns a list of properties within a class.
  */
 public function testGetProperties()
 {
     $class = new ReflectionClass(self::FIXTURE_NS . '\\ClassWithProperties');
     $properties = $class->getProperties(InternalReflectionProperty::IS_PUBLIC);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionProperty', $properties[0]);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionProperty', $properties[1]);
     $this->assertEquals('foo', $properties[0]->name);
     $this->assertEquals('bar', $properties[1]->name);
 }