Completed
Push — master ( e44201...7c00aa )
by Ivannis Suárez
04:26
created
Tests/Units/Middlewares/Validator/ValidatorMiddlewareTests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this
32 32
             ->given($middleware = new ValidatorMiddleware())
33 33
             ->and($command = new LoginUserEvent('[email protected]', 'plainpassword'))
34
-            ->and($callable = function (LoginUserEvent $command) {
34
+            ->and($callable = function(LoginUserEvent $command) {
35 35
                 $command->setEmail('[email protected]');
36 36
             })
37 37
             ->when($middleware->handle($command, $callable))
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         $this
44 44
             ->given($middleware = new ValidatorMiddleware())
45 45
             ->and($command = new LoginUserEvent('invalid.email.com', 'plainpassword'))
46
-            ->and($callable = function () {
46
+            ->and($callable = function() {
47 47
             })
48 48
             ->then()
49
-                ->exception(function () use ($middleware, $command, $callable) {
49
+                ->exception(function() use ($middleware, $command, $callable) {
50 50
                     $middleware->handle($command, $callable);
51 51
                 })->isInstanceOf(ValidationException::class)
52 52
         ;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this
55 55
             ->given($middleware = new ValidatorMiddleware())
56 56
             ->and($command = new LogoutUserEvent('invalid.email.com'))
57
-            ->and($callable = function (LogoutUserEvent $command) {
57
+            ->and($callable = function(LogoutUserEvent $command) {
58 58
                 $command->setEmail('[email protected]');
59 59
             })
60 60
             ->when($middleware->handle($command, $callable))
Please login to merge, or discard this patch.
Tests/Units/Middlewares/Locking/LockingMiddlewareTests.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this
31 31
             ->given($middleware = new LockingMiddleware())
32 32
             ->and($event = new LoginUserEvent('[email protected]'))
33
-            ->and($callable = function (LoginUserEvent $event) {
33
+            ->and($callable = function(LoginUserEvent $event) {
34 34
                 $event->setEmail('[email protected]');
35 35
             })
36 36
             ->when($middleware->handle($event, $callable))
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
         $this
43 43
             ->given($middleware = new LockingMiddleware())
44 44
             ->and($event = new LoginUserEvent('[email protected]'))
45
-            ->and($callable = function (LoginUserEvent $event) {
45
+            ->and($callable = function(LoginUserEvent $event) {
46 46
                 $event->setEmail('[email protected]');
47 47
 
48 48
                 throw new \InvalidArgumentException();
49 49
             })
50 50
             ->then()
51
-                ->exception(function () use ($middleware, $event, $callable) {
51
+                ->exception(function() use ($middleware, $event, $callable) {
52 52
                     $middleware->handle($event, $callable);
53 53
                 })
54 54
                 ->isInstanceOf(\InvalidArgumentException::class)
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
 
57 57
         $this
58 58
             ->given($middleware = new LockingMiddleware())
59
-            ->and($callable = function (LoginUserEvent $event) {
59
+            ->and($callable = function(LoginUserEvent $event) {
60 60
                 $event->setEmail(md5($event->email()));
61 61
             })
62 62
             ->and($listener = new TriggerEventOnListener($middleware, $callable))
63 63
             ->and($event = new LoginUserEvent('[email protected]'))
64
-            ->when($middleware->handle($event, function ($event) use ($listener) {
64
+            ->when($middleware->handle($event, function($event) use ($listener) {
65 65
                 $listener->onLogin($event);
66 66
             }))
67 67
             ->then()
Please login to merge, or discard this patch.