Passed
Push — master ( e04bc8...d279ac )
by Anton
02:48
created
tests/Framework/Encrypter/KeyCommandTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function testMountFileNotFound(): void
26 26
     {
27 27
         $out = $this->runCommand('encrypt:key', [
28
-            '-m' => __DIR__ . '/.env'
28
+            '-m' => __DIR__.'/.env'
29 29
         ]);
30 30
 
31 31
         $this->assertStringContainsString('Unable to find', $out);
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function testReplace(): void
35 35
     {
36
-        file_put_contents(__DIR__ . '/.env', '{encrypt-key}');
36
+        file_put_contents(__DIR__.'/.env', '{encrypt-key}');
37 37
 
38 38
         $out = $this->runCommand('encrypt:key', [
39
-            '-m' => __DIR__ . '/.env'
39
+            '-m' => __DIR__.'/.env'
40 40
         ]);
41 41
 
42 42
         $this->assertStringContainsString('key has been updated', $out);
43 43
 
44
-        $body = file_get_contents(__DIR__ . '/.env');
44
+        $body = file_get_contents(__DIR__.'/.env');
45 45
         $this->assertStringContainsString($body, $out);
46 46
 
47
-        unlink(__DIR__ . '/.env');
47
+        unlink(__DIR__.'/.env');
48 48
     }
49 49
 
50 50
     public function testReplaceCurrent(): void
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
             'ENCRYPTER_KEY' => $key
56 56
         ]);
57 57
 
58
-        file_put_contents(__DIR__ . '/.env', $key);
58
+        file_put_contents(__DIR__.'/.env', $key);
59 59
 
60 60
         $out = $app->console()->run('encrypt:key', [
61
-            '-m' => __DIR__ . '/.env'
61
+            '-m' => __DIR__.'/.env'
62 62
         ]);
63 63
         $out = $out->getOutput()->fetch();
64 64
 
65 65
         $this->assertStringContainsString('key has been updated', $out);
66 66
 
67
-        $body = file_get_contents(__DIR__ . '/.env');
67
+        $body = file_get_contents(__DIR__.'/.env');
68 68
         $this->assertStringContainsString($body, $out);
69 69
 
70
-        unlink(__DIR__ . '/.env');
70
+        unlink(__DIR__.'/.env');
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
tests/Framework/GRPC/DispatcherTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
     public function setUp(): void
24 24
     {
25 25
         exec('protoc 2>&1', $out);
26
-        if (strpos(join("\n", $out), '--php_out') === false) {
26
+        if (strpos(join("\n", $out), '--php_out') === false){
27 27
             $this->markTestSkipped('Protoc binary is missing');
28 28
         }
29 29
 
30 30
         parent::setUp();
31 31
 
32 32
         $fs = new Files();
33
-        $proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
33
+        $proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
34 34
 
35 35
         // protoc can't figure relative paths
36 36
         $proto = str_replace('Framework/../', '', $proto);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'proto' => $proto
40 40
         ]);
41 41
 
42
-        file_put_contents($this->app->dir('app') . 'src/Service/EchoService.php', GenerateTest::SERVICE);
42
+        file_put_contents($this->app->dir('app').'src/Service/EchoService.php', GenerateTest::SERVICE);
43 43
     }
44 44
 
45 45
     public function tearDown(): void
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 
49 49
         $fs = new Files();
50 50
 
51
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
52
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
51
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
52
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
53 53
         }
54 54
 
55
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
56
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
55
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
56
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
57 57
         }
58 58
     }
59 59
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $msg->setMsg('hello');
80 80
 
81 81
         $w->shouldReceive('receive')->once()->with(
82
-            \Mockery::on(function (&$context) {
82
+            \Mockery::on(function (&$context){
83 83
                 $context = '{
84 84
                   "service": "service.Echo",
85 85
                   "method": "Ping",
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         )->andReturn($msg->serializeToString());
92 92
 
93 93
         $w->shouldReceive('send')->once()->with(
94
-            \Mockery::on(function ($out) {
94
+            \Mockery::on(function ($out){
95 95
                 $msg = new Message();
96 96
                 $msg->mergeFromString($out);
97 97
                 $this->assertSame('hello', $msg->getMsg());
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         // one command only
105 105
         $w->shouldReceive('receive')->once()->with(
106
-            \Mockery::on(function (&$context) {
106
+            \Mockery::on(function (&$context){
107 107
                 $context = null;
108 108
                 return true;
109 109
             })
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $msg->setMsg('hello');
124 124
 
125 125
         $w->shouldReceive('receive')->once()->with(
126
-            \Mockery::on(function (&$context) {
126
+            \Mockery::on(function (&$context){
127 127
                 $context = '{
128 128
                   "service": "service.Echo",
129 129
                   "method": "Invalid",
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         )->andReturn($msg->serializeToString());
136 136
 
137 137
         $w->shouldReceive('error')->once()->with(
138
-            \Mockery::on(function ($out) {
138
+            \Mockery::on(function ($out){
139 139
                 $this->assertStringContainsString('Method `Invalid` not found', $out);
140 140
                 return true;
141 141
             })
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         // one command only
145 145
         $w->shouldReceive('receive')->once()->with(
146
-            \Mockery::on(function (&$context) {
146
+            \Mockery::on(function (&$context){
147 147
                 $context = null;
148 148
                 return true;
149 149
             })
Please login to merge, or discard this patch.
tests/Framework/Cycle/MigrateTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
53 53
         $output = $this->runCommandDebug('cycle:migrate', ['-r' => true]);
54 54
         $this->assertStringContainsString('default.users', $output);
55 55
 
56
-        $user = file_get_contents(__DIR__ . '/../../app/src/User/User.php');
57
-        unlink(__DIR__ . '/../../app/src/User/User.php');
58
-        try {
56
+        $user = file_get_contents(__DIR__.'/../../app/src/User/User.php');
57
+        unlink(__DIR__.'/../../app/src/User/User.php');
58
+        try{
59 59
             $output = $this->runCommandDebug('cycle:migrate', ['-r' => true]);
60 60
             $this->assertStringContainsString('drop foreign key', $output);
61
-        } finally {
62
-            file_put_contents(__DIR__ . '/../../app/src/User/User.php', $user);
61
+        }finally{
62
+            file_put_contents(__DIR__.'/../../app/src/User/User.php', $user);
63 63
         }
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
tests/Framework/Http/CookiesTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function testHasCookie(): void
38 38
     {
39
-        $this->http->setHandler(function () {
40
-            return (int) $this->cookies()->has('a');
39
+        $this->http->setHandler(function (){
40
+            return (int)$this->cookies()->has('a');
41 41
         });
42 42
 
43 43
         $result = $this->get('/');
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         ]);
55 55
         $this->http = $this->app->get(Http::class);
56 56
 
57
-        $this->http->setHandler(function () {
58
-            return (int) $this->cookies()->has('a');
57
+        $this->http->setHandler(function (){
58
+            return (int)$this->cookies()->has('a');
59 59
         });
60 60
 
61 61
         $result = $this->get('/', [], [], [
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
72 72
         $this->http = $this->app->get(Http::class);
73 73
 
74
-        $this->http->setHandler(function () {
74
+        $this->http->setHandler(function (){
75 75
             return $this->cookies()->get('a');
76 76
         });
77 77
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
89 89
         $this->http = $this->app->get(Http::class);
90 90
 
91
-        $this->http->setHandler(function () {
91
+        $this->http->setHandler(function (){
92 92
             $this->cookies()->set('a', 'value');
93 93
 
94 94
             return 'ok';
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
113 113
         $this->http = $this->app->get(Http::class);
114 114
 
115
-        $this->http->setHandler(function () {
115
+        $this->http->setHandler(function (){
116 116
             $this->cookies()->schedule(Cookie::create('a', 'value'));
117 117
             $this->assertSame([], $this->cookies()->getAll());
118 118
             $this->assertCount(1, $this->cookies()->getScheduled());
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
139 139
         $this->http = $this->app->get(Http::class);
140 140
 
141
-        $this->http->setHandler(function () {
141
+        $this->http->setHandler(function (){
142 142
             $this->cookies()->delete('cookie');
143 143
 
144 144
             return 'ok';
Please login to merge, or discard this patch.
tests/Framework/Http/RrTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         );
44 44
 
45 45
         $psr->shouldReceive('respond')->once()->with(
46
-            \Mockery::on(function ($r) {
46
+            \Mockery::on(function ($r){
47 47
                 $this->assertSame('Hello, dave.', (string)$r->getBody());
48 48
                 return true;
49 49
             })
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         );
66 66
 
67 67
         $psr->shouldReceive('respond')->once()->with(
68
-            \Mockery::on(function ($r) {
68
+            \Mockery::on(function ($r){
69 69
                 $this->assertStringContainsString('500', (string)$r->getBody());
70 70
                 return true;
71 71
             })
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $psr->shouldReceive('acceptRequest')->once()->andReturn(null);
75 75
 
76 76
         $files = $this->app->get(FilesInterface::class)->getFiles(
77
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
77
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
78 78
         );
79 79
 
80 80
         $this->assertCount(0, $files);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $this->app->get(RrDispatcher::class)->serve($psr);
83 83
 
84 84
         $files = $this->app->get(FilesInterface::class)->getFiles(
85
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
85
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
86 86
         );
87 87
 
88 88
         $this->assertCount(1, $files);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         );
104 104
 
105 105
         $psr->shouldReceive('respond')->once()->with(
106
-            \Mockery::on(function ($r) {
106
+            \Mockery::on(function ($r){
107 107
                 $this->assertStringContainsString('undefined', (string)$r->getBody());
108 108
                 return true;
109 109
             })
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $psr->shouldReceive('acceptRequest')->once()->andReturn(null);
113 113
 
114 114
         $files = $this->app->get(FilesInterface::class)->getFiles(
115
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
115
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
116 116
         );
117 117
 
118 118
         $this->assertCount(0, $files);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->app->get(RrDispatcher::class)->serve($psr);
121 121
 
122 122
         $files = $this->app->get(FilesInterface::class)->getFiles(
123
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
123
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
124 124
         );
125 125
 
126 126
         $this->assertCount(1, $files);
Please login to merge, or discard this patch.
tests/Framework/Framework/ExtensionsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         $output = $this->runCommand('php:extensions');
21 21
 
22
-        foreach (get_loaded_extensions() as $extension) {
22
+        foreach (get_loaded_extensions() as $extension){
23 23
             $this->assertStringContainsString($extension, $output);
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
tests/Framework/Views/CompileTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
          */
39 39
         $dirs = $this->app->get(DirectoriesInterface::class);
40 40
         $fs = $this->app->get(FilesInterface::class);
41
-        $fs->write($dirs->get('cache') . '/views/test.php', 'test', null, true);
41
+        $fs->write($dirs->get('cache').'/views/test.php', 'test', null, true);
42 42
 
43 43
         $out = $this->runCommandDebug('views:reset');
44 44
         $this->assertStringContainsString('test.php', $out);
Please login to merge, or discard this patch.