コード例 #1
0
 /**
  * Test that reader is correctly initialized.
  */
 public function testInitialize()
 {
     $file = __DIR__ . '/../../test_file.txt';
     $reader = new FileReaderHelper($file);
     $accessor = new EntityAccessorHelper($reader);
     $this->assertSame($file, $accessor->getValue('file'));
 }
コード例 #2
0
 public function testGetProperties()
 {
     $helper = new EntityAccessorHelper(new TestObject());
     $expectedPropsArr = array(new \ReflectionProperty(new TestObject(), 'field1'), new \ReflectionProperty(new TestObject(), 'field2'), new \ReflectionProperty(new TestObject(), 'privateField1'), new \ReflectionProperty(new TestObject(), 'privateField2'));
     $this->assertEquals($expectedPropsArr, $helper->getProperties());
 }