@@ -93,17 +93,17 @@ |
||
93 | 93 | { |
94 | 94 | // Mock the processor |
95 | 95 | $processor = $this->getMockBuilder(Processor::class) |
96 | - ->disableOriginalConstructor() |
|
97 | - ->setMethods(['getResponseData', 'processPayload']) |
|
98 | - ->getMock(); |
|
96 | + ->disableOriginalConstructor() |
|
97 | + ->setMethods(['getResponseData', 'processPayload']) |
|
98 | + ->getMock(); |
|
99 | 99 | |
100 | 100 | $processor->expects($this->once()) |
101 | - ->method('processPayload') |
|
102 | - ->willReturn($processor); |
|
101 | + ->method('processPayload') |
|
102 | + ->willReturn($processor); |
|
103 | 103 | |
104 | 104 | $processor->expects($this->once()) |
105 | - ->method('getResponseData') |
|
106 | - ->willReturn($responseData); |
|
105 | + ->method('getResponseData') |
|
106 | + ->willReturn($responseData); |
|
107 | 107 | |
108 | 108 | /** @var \PHPUnit_Framework_MockObject_MockObject|GraphQLService $service */ |
109 | 109 | $service = $this->getMockBuilder(GraphQLService::class) |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | { |
32 | 32 | /** @var \PHPUnit_Framework_MockObject_MockObject|CacheRepository $cacheRepository */ |
33 | 33 | $this->cache = $this->getMockBuilder(CacheRepository::class) |
34 | - ->setMethods(['get', 'forever']) |
|
35 | - ->getMockForAbstractClass(); |
|
34 | + ->setMethods(['get', 'forever']) |
|
35 | + ->getMockForAbstractClass(); |
|
36 | 36 | |
37 | 37 | $this->processor = new Processor(new Schema()); |
38 | 38 | $this->service = new GraphQLService($this->processor, $this->cache); |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | public function testGetProcessor() |
43 | 43 | { |
44 | 44 | $this->cache->expects($this->any()) |
45 | - ->method('get') |
|
46 | - ->with(GraphQLService::PROCESSOR_CACHE_KEY) |
|
47 | - ->willReturn($this->processor); |
|
45 | + ->method('get') |
|
46 | + ->with(GraphQLService::PROCESSOR_CACHE_KEY) |
|
47 | + ->willReturn($this->processor); |
|
48 | 48 | |
49 | 49 | $this->assertEquals($this->processor, $this->service->getProcessor()); |
50 | 50 | } |
@@ -40,18 +40,18 @@ discard block |
||
40 | 40 | // Mock a NewRelic instance |
41 | 41 | /** @var \PHPUnit_Framework_MockObject_MockObject|Newrelic $newRelic */ |
42 | 42 | $newRelic = $this->getMockBuilder(Newrelic::class) |
43 | - ->setMethods(['noticeError']) |
|
44 | - ->getMock(); |
|
43 | + ->setMethods(['noticeError']) |
|
44 | + ->getMock(); |
|
45 | 45 | |
46 | 46 | $graphQLError = new GraphQLError('Some query', ['foo' => 'bar'], [new \Exception()]); |
47 | 47 | |
48 | 48 | $newRelic->expects($this->once()) |
49 | - ->method('noticeError') |
|
50 | - ->with(JsonEncoder::encode([ |
|
51 | - 'query' => $graphQLError->getQuery(), |
|
52 | - 'variables' => $graphQLError->getVariables(), |
|
53 | - 'message' => '', |
|
54 | - ]), $graphQLError->getExceptions()[0]); |
|
49 | + ->method('noticeError') |
|
50 | + ->with(JsonEncoder::encode([ |
|
51 | + 'query' => $graphQLError->getQuery(), |
|
52 | + 'variables' => $graphQLError->getVariables(), |
|
53 | + 'message' => '', |
|
54 | + ]), $graphQLError->getExceptions()[0]); |
|
55 | 55 | |
56 | 56 | // Create a request with errors |
57 | 57 | $request = new Request(); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | // Check again with no errors - nothing should get reported |
64 | 64 | $newRelic->expects($this->never()) |
65 | - ->method('noticeError'); |
|
65 | + ->method('noticeError'); |
|
66 | 66 | |
67 | 67 | $this->assertMiddlewarePasses($middleware); |
68 | 68 | } |