@@ -17,10 +17,10 @@ |
||
17 | 17 | ->method('execute') |
18 | 18 | ->with($context); |
19 | 19 | |
20 | - $loggerMock = $this->getLoggerMock(); |
|
20 | + $loggerMock = $this->getLoggerMock(); |
|
21 | 21 | $loggerMock->expects($this->once()) |
22 | 22 | ->method('debug') |
23 | - ->willReturnCallback(function ($pMessage, $pContext) use ($action, $context) { |
|
23 | + ->willReturnCallback(function($pMessage, $pContext) use ($action, $context) { |
|
24 | 24 | $expectedMessage = sprintf('Executing action "%s"', get_class($action)); |
25 | 25 | $this->assertEquals($expectedMessage, $pMessage); |
26 | 26 | $this->assertArrayHasKey('context', $pContext); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $wrapper->expects($this->once()) |
24 | 24 | ->method('beforeAction') |
25 | 25 | ->with($context) |
26 | - ->willReturnCallback(function () use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
26 | + ->willReturnCallback(function() use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
27 | 27 | $this->assertFalse($beforeCalled, 'beforeAction already called - should be called only once'); |
28 | 28 | $this->assertFalse($executeCalled, 'execute should not been executed before beforeAction'); |
29 | 29 | $this->assertFalse($afterCalled, 'afterAction should be executed before beforeAction'); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $action->expects($this->once()) |
34 | 34 | ->method('execute') |
35 | 35 | ->with($context) |
36 | - ->willReturnCallback(function () use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
36 | + ->willReturnCallback(function() use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
37 | 37 | $this->assertTrue($beforeCalled, 'beforeAction should have been called'); |
38 | 38 | $this->assertFalse($executeCalled, 'execute already called - should be executed only once'); |
39 | 39 | $this->assertFalse($afterCalled, 'afterAction should be executed before beforeAction'); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $wrapper->expects($this->once()) |
44 | 44 | ->method('afterAction') |
45 | 45 | ->with($context) |
46 | - ->willReturnCallback(function () use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
46 | + ->willReturnCallback(function() use (&$beforeCalled, &$executeCalled, &$afterCalled) { |
|
47 | 47 | $this->assertTrue($beforeCalled, 'beforeAction should have been called'); |
48 | 48 | $this->assertTrue($executeCalled, 'execute should be executed before afterAction'); |
49 | 49 | $this->assertFalse($afterCalled, 'afterAction already called - should be executed only once'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | public function test_execute_calls_first_action() |
21 | 21 | { |
22 | - $mainAction = new CatchableErrorAction( |
|
22 | + $mainAction = new CatchableErrorAction( |
|
23 | 23 | $firstAction = $this->getActionMock(), |
24 | 24 | $secondAction = $this->getActionMock() |
25 | 25 | ); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function test_execute_calls_second_action_if_first_throws_exception_and_add_exception_to_context() |
37 | 37 | { |
38 | - $mainAction = new CatchableErrorAction( |
|
38 | + $mainAction = new CatchableErrorAction( |
|
39 | 39 | $firstAction = $this->getActionMock(), |
40 | 40 | $secondAction = $this->getActionMock() |
41 | 41 | ); |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | $endpointResolverMock->expects($this->once()) |
84 | 84 | ->method('resolve') |
85 | - ->willReturnCallback(function (CriteriaSet $criteriaSet, array $endpoints) use ($descriptorType, $expectedDestination) { |
|
85 | + ->willReturnCallback(function(CriteriaSet $criteriaSet, array $endpoints) use ($descriptorType, $expectedDestination) { |
|
86 | 86 | $this->assertTrue($criteriaSet->has(LocationCriteria::class)); |
87 | 87 | $arr = $criteriaSet->get(LocationCriteria::class); |
88 | 88 | $this->assertCount(1, $arr); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $endpointResolverMock->expects($this->once()) |
27 | 27 | ->method('resolve') |
28 | - ->willReturnCallback(function (CriteriaSet $criteriaSet, array $endpoints) { |
|
28 | + ->willReturnCallback(function(CriteriaSet $criteriaSet, array $endpoints) { |
|
29 | 29 | $this->assertTrue($criteriaSet->has(ServiceTypeCriteria::class)); |
30 | 30 | $arr = $criteriaSet->get(ServiceTypeCriteria::class); |
31 | 31 | $this->assertCount(1, $arr); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | $logger->expects($this->once()) |
49 | 49 | ->method('critical') |
50 | - ->willReturnCallback(function ($message, $arr) { |
|
50 | + ->willReturnCallback(function($message, $arr) { |
|
51 | 51 | $this->assertEquals('Unexpected binding type "urn:oasis:names:tc:SAML:2.0:bindings:SOAP" - expected binding types are: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', $message); |
52 | 52 | $this->assertTrue(is_array($arr)); |
53 | 53 | }); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $assertionActionMock->expects($this->exactly(2)) |
34 | 34 | ->method('execute') |
35 | 35 | ->with($this->isInstanceOf(AssertionContext::class)) |
36 | - ->willReturnCallback(function (AssertionContext $assertionContext) use (&$assertion1, &$assertion2, &$assertion1Called, &$assertion2Called) { |
|
36 | + ->willReturnCallback(function(AssertionContext $assertionContext) use (&$assertion1, &$assertion2, &$assertion1Called, &$assertion2Called) { |
|
37 | 37 | if ($assertionContext->getAssertion() === $assertion1) { |
38 | 38 | $assertion1Called = true; |
39 | 39 | } elseif ($assertionContext->getAssertion() === $assertion2) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $sessionProcessorMock->expects($this->once()) |
33 | 33 | ->method('processAssertions') |
34 | 34 | ->with($this->isType('array'), $ownEntityId, $partyEntityId) |
35 | - ->willReturnCallback(function (array $assertions, $ownId, $partyId) use ($assertion1, $assertion2) { |
|
35 | + ->willReturnCallback(function(array $assertions, $ownId, $partyId) use ($assertion1, $assertion2) { |
|
36 | 36 | $this->assertSame($assertion1, $assertions[0]); |
37 | 37 | $this->assertSame($assertion2, $assertions[1]); |
38 | 38 | }) |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $endpointResolverMock->expects($this->once()) |
41 | 41 | ->method('resolve') |
42 | 42 | ->with($this->isInstanceOf(CriteriaSet::class), $this->isType('array')) |
43 | - ->willReturnCallback(function (CriteriaSet $criteriaSet, array $candidates) { |
|
43 | + ->willReturnCallback(function(CriteriaSet $criteriaSet, array $candidates) { |
|
44 | 44 | $this->assertTrue($criteriaSet->has(DescriptorTypeCriteria::class)); |
45 | 45 | $this->assertEquals(SpSsoDescriptor::class, $criteriaSet->getSingle(DescriptorTypeCriteria::class)->getDescriptorType()); |
46 | 46 |