Example #1
0
 /**
  * @test
  */
 function parseArrayProperty()
 {
     $this->parser->setTraverser(new Tx_PhpParser_Parser_Traverser());
     $classFileObject = $this->parseFile('ClassWithArrayProperty.php');
     $this->assertEquals(count($classFileObject->getFirstClass()->getProperties()), 1);
     $this->assertNotEquals($classFileObject->getFirstClass()->getProperty('property')->getValue(), array('a' => 'b', '5' => 1223, 'foo' => array('foo' => 'bar'), array(1, 4, 3)));
     $this->assertEquals($classFileObject->getFirstClass()->getProperty('property')->getValue(), array('a' => 'b', '5' => 1223, 'foo' => array('foo' => 'bar'), array(1, 2, 3)));
     $this->assertEquals($classFileObject->getFirstClass()->getProperty('property')->getModifierNames(), array('protected'));
 }