public function testGetDocument() { $document = DocumentFixtures::getAgentProfileDocument(); $profile = $document->getAgentProfile(); $this->validateRetrieveApiCall('get', 'agents/profile', array('agent' => 'agent-as-json', 'profileId' => 'profile-id'), 200, 'DocumentData', $document->getData(), array(array('data' => $profile->getAgent(), 'result' => 'agent-as-json'))); $document = $this->client->getDocument($profile); $this->assertInstanceOf('Xabbuh\\XApi\\Model\\AgentProfileDocument', $document); $this->assertEquals($profile, $document->getAgentProfile()); }
public function testSerializeAgentProfileDocument() { $document = DocumentFixtures::getAgentProfileDocument(); $this->assertJsonEquals(DocumentJsonFixtures::getDocument(), $this->documentSerializer->serializeDocument($document)); }