Completed
Push — master ( 3ba758...b5e37b )
by Liaw
02:27
created
tests/LightSaml/Tests/Action/ActionLogWrapperTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Action/WrappedActionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Action/CatchableErrorActionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
Action/Profile/Inbound/Message/AbstractDestinationValidatorActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Profile/Inbound/Message/DestinationValidatorAuthnRequestActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Tests/Action/Profile/Inbound/Message/AssertBindingTypeActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
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
             });
Please login to merge, or discard this patch.
LightSaml/Tests/Action/Profile/Inbound/Response/AssertionActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
LightSaml/Tests/Action/Profile/Inbound/Response/SpSsoStateActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
             })
Please login to merge, or discard this patch.
LightSaml/Tests/Action/Profile/Outbound/AuthnRequest/ACSUrlActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.