Beispiel #1
0
 /**
  * @test
  */
 public function setTest()
 {
     $this->fixture->setValueForKey('firstName', 'Steve');
     $this->fixture->setValueForKey('lastName', 'Jobs');
     $this->assertEquals('Steve', $this->fixture->valueForKey('firstName'));
     $this->assertEquals('Jobs', $this->fixture->valueForKey('lastName'));
 }
Beispiel #2
0
 /**
  * @test
  */
 public function prepareDataFromVirtualObjectDataUpdateTest()
 {
     $testObjectData = $this->testObjectData;
     unset($testObjectData['property1']);
     unset($testObjectData['property6']);
     $testRawData = $this->testRawData;
     unset($testRawData['property_one']);
     unset($testRawData['property_six']);
     $virtualObject = new VirtualObject($testObjectData);
     $rawData = $this->fixture->prepareDataFromVirtualObjectData($virtualObject->getData(), FALSE);
     $this->assertEquals($testRawData, $rawData);
 }
 /**
  * @param VirtualObject $virtualObject
  * @return array
  */
 protected function getTestDataFromObject($virtualObject)
 {
     $virtualObjectData = $virtualObject->getData();
     $virtualObjectData['content_time'] = $virtualObjectData['contentTime'];
     unset($virtualObjectData['contentTime']);
     return $virtualObjectData;
 }