/** * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException */ public function testNoIdentifierPath() { // easy path $paths = array('non_username' => 'non_existing'); $this->responseObject->setPaths($paths); $this->responseObject->setResponse(json_encode(array('foo' => 'bar'))); // should throw exception $this->responseObject->getNickname(); }
public function testNoIdentifierPathReturnsNull() { $paths = array('non_username' => 'non_existing'); $responseObject = new PathUserResponse(); $responseObject->setPaths($paths); $responseObject->setResponse(json_encode(array('foo' => 'bar'))); $this->assertNull($responseObject->getNickname()); }