diff --git a/test/src/Grant/GrantTestCase.php b/test/src/Grant/GrantTestCase.php index 5451b331..125c66ce 100644 --- a/test/src/Grant/GrantTestCase.php +++ b/test/src/Grant/GrantTestCase.php @@ -65,7 +65,7 @@ public function testGetAccessToken($grant, array $params = []) ->shouldReceive('getHeader') ->once() ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); /** @var ClientInterface & MockInterface $client */ $client = Mockery::spy(ClientInterface::class)->makePartial(); diff --git a/test/src/Provider/AbstractProviderTest.php b/test/src/Provider/AbstractProviderTest.php index b9ebf6f1..93cf97a7 100644 --- a/test/src/Provider/AbstractProviderTest.php +++ b/test/src/Provider/AbstractProviderTest.php @@ -213,7 +213,7 @@ public function testGetUserProperties($name = null, $email = null, $id = null) ->shouldReceive('getHeader') ->once() ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::spy(ClientInterface::class, [ @@ -262,7 +262,7 @@ public function testGetUserPropertiesThrowsExceptionWhenNonJsonResponseIsReceive $response ->shouldReceive('getHeader') ->with('content-type') - ->andReturn('text/html'); + ->andReturn(['text/html']); $client = Mockery::mock(ClientInterface::class, [ 'send' => $response, @@ -378,7 +378,7 @@ public function testPkceMethod($pkceMethod, $pkceCode, $expectedChallenge) ->shouldReceive('getHeader') ->once() ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::spy(ClientInterface::class, [ 'send' => $response, @@ -474,7 +474,7 @@ public function testErrorResponsesCanBeCustomizedAtTheProvider() ->shouldReceive('getHeader') ->once() ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::spy(ClientInterface::class, [ 'send' => $response, @@ -532,7 +532,7 @@ public function testClientErrorTriggersProviderException() $response ->shouldReceive('getHeader') ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::mock(ClientInterface::class); $client @@ -579,7 +579,7 @@ public function testAuthenticatedRequestAndResponse() $response ->shouldReceive('getHeader') ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::mock(ClientInterface::class); $client @@ -647,7 +647,7 @@ public function testGetAccessToken($method) ->shouldReceive('getHeader') ->once() ->with('content-type') - ->andReturn('application/json'); + ->andReturn(['application/json']); $client = Mockery::spy(ClientInterface::class, [ 'send' => $response, @@ -686,7 +686,7 @@ public function testGetAccessTokenWithNonJsonResponse() $response ->shouldReceive('getHeader') ->with('content-type') - ->andReturn('text/plain'); + ->andReturn(['text/plain']); $client = Mockery::mock(ClientInterface::class, [ 'send' => $response, @@ -745,7 +745,7 @@ public function testParseResponse($body, $type, $parsed, $statusCode = 200) $response ->shouldReceive('getHeader') ->with('content-type') - ->andReturn($type); + ->andReturn([$type]); $method = $this->getMethod(AbstractProvider::class, 'parseResponse'); $result = $method->invoke($this->getMockProvider(), $response);