Esempio n. 1
0
 public function testStandardObject()
 {
     $stdObj = new \stdClass();
     $stdObj->prop1 = 'property 1';
     $stdObj->prop2 = 'property 2';
     $stdObj->propn = 'property n';
     $this->obj->setTestObject($stdObj);
     $arr = $this->obj->convert(new PhpArray(true));
     $this->assertArrayHasKey('testObject', $arr);
     $this->assertEquals(get_object_vars($stdObj), $arr['testObject']);
 }
Esempio n. 2
0
 protected function setUp()
 {
     $this->obj = new \MortadellaEntity();
     $this->obj->testEntityMarshal = new \MortadellaEntity();
     $this->obj->testTypedArray1 = array(new \MortadellaEntity(), new \MortadellaEntity(), new \MortadellaEntity(), new \stdClass());
     $stdObj = new \stdClass();
     $stdObj->prop1 = 'property 1';
     $stdObj->prop2 = 'property 2';
     $stdObj->propn = 'property n';
     $this->obj->setTestObject($stdObj);
 }