public function testGetUsername() { // easy path $paths = array('identifier' => 'id'); $this->responseObject->setPaths($paths); $this->responseObject->setResponse(json_encode(array('id' => 666))); $this->assertEquals(666, $this->responseObject->getUsername()); }
public function testGetUsernameWithoutResponseReturnsNull() { $this->responseObject->setPaths(array('identifier' => 'id')); $this->assertNull($this->responseObject->getUsername()); }