Test Failed
Pull Request — master (#1186)
by Abdul Malik
10:30
created
src/Security/tests/Traits/GuardedTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
         self::assertSame(static::OPERATION, $guarded->resolvePermission(static::OPERATION));
88 88
 
89 89
         $guarded = new GuardedWithNamespace();
90
-        $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE . '.' . static::OPERATION;
90
+        $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE.'.'.static::OPERATION;
91 91
         self::assertSame($resolvedPermission, $guarded->resolvePermission(static::OPERATION));
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
src/Security/tests/PermissionManagerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
         self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION));
92 92
 
93 93
         // test pattern permission
94
-        self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION . '.*', AllowRule::class));
95
-        self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION . '.' . static::PERMISSION));
94
+        self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION.'.*', AllowRule::class));
95
+        self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION.'.'.static::PERMISSION));
96 96
 
97 97
         self::assertEquals($manager, $manager->deassociate(static::ROLE, static::PERMISSION));
98 98
         self::assertEquals($forbidRule, $manager->getRule(static::ROLE, static::PERMISSION));
Please login to merge, or discard this patch.
src/Translator/tests/LoaderTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function testHasLocale(): void
19 19
     {
20 20
         $loader = new CatalogueLoader(new TranslatorConfig([
21
-            'directory' => __DIR__ . '/fixtures/locales/',
21
+            'directory' => __DIR__.'/fixtures/locales/',
22 22
         ]));
23 23
 
24 24
         self::assertTrue($loader->hasLocale('ru'));
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
         self::assertFalse($loader->hasLocale('FR'));
28 28
 
29 29
         $loader = new CatalogueLoader(new TranslatorConfig([
30
-            'directory' => __DIR__ . '/fixtures/locales/',
31
-            'directories' => [__DIR__ . '/fixtures/additional'],
30
+            'directory' => __DIR__.'/fixtures/locales/',
31
+            'directories' => [__DIR__.'/fixtures/additional'],
32 32
         ]));
33 33
 
34 34
         self::assertTrue($loader->hasLocale('ru'));
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function testGetLocales(): void
41 41
     {
42 42
         $loader = new CatalogueLoader(new TranslatorConfig([
43
-            'directory' => __DIR__ . '/fixtures/locales/',
43
+            'directory' => __DIR__.'/fixtures/locales/',
44 44
         ]));
45 45
 
46 46
         $compared = $loader->getLocales();
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     public function testGetLocalesWithAdditionalDirectories(): void
55 55
     {
56 56
         $loader = new CatalogueLoader(new TranslatorConfig([
57
-            'directory' => __DIR__ . '/fixtures/locales/',
58
-            'directories' => [__DIR__ . '/fixtures/additional'],
57
+            'directory' => __DIR__.'/fixtures/locales/',
58
+            'directories' => [__DIR__.'/fixtures/additional'],
59 59
         ]));
60 60
 
61 61
         $compared = $loader->getLocales();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function testLoadCatalogue(): void
70 70
     {
71 71
         $loader = new CatalogueLoader(new TranslatorConfig([
72
-            'directory' => __DIR__ . '/fixtures/locales/',
72
+            'directory' => __DIR__.'/fixtures/locales/',
73 73
             'loaders'   => [
74 74
                 'php' => PhpFileLoader::class,
75 75
                 'po'  => PoFileLoader::class,
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     public function testLoadCatalogueWithAdditionalDirectories(): void
106 106
     {
107 107
         $loader = new CatalogueLoader(new TranslatorConfig([
108
-            'directory' => __DIR__ . '/fixtures/locales/',
109
-            'directories' => [__DIR__ . '/fixtures/additional'],
108
+            'directory' => __DIR__.'/fixtures/locales/',
109
+            'directories' => [__DIR__.'/fixtures/additional'],
110 110
             'loaders'   => [
111 111
                 'php' => PhpFileLoader::class,
112 112
                 'po'  => PoFileLoader::class,
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     public function testApplicationTranslationShouldOverrideAdditionalTranslations(): void
128 128
     {
129 129
         $loader = new CatalogueLoader(new TranslatorConfig([
130
-            'directory' => __DIR__ . '/fixtures/locales/',
131
-            'directories' => [__DIR__ . '/fixtures/additional'],
130
+            'directory' => __DIR__.'/fixtures/locales/',
131
+            'directories' => [__DIR__.'/fixtures/additional'],
132 132
             'loaders'   => [
133 133
                 'php' => PhpFileLoader::class,
134 134
                 'po'  => PoFileLoader::class,
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function testLoadCatalogueNoLoader(): void
146 146
     {
147 147
         $loader = new CatalogueLoader(new TranslatorConfig([
148
-            'directory' => __DIR__ . '/fixtures/locales/',
148
+            'directory' => __DIR__.'/fixtures/locales/',
149 149
             'loaders'   => [
150 150
                 'php' => PhpFileLoader::class,
151 151
             ],
Please login to merge, or discard this patch.
src/Cache/tests/Storage/FileStorageTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function testGetsWithExistsValueAndCacheFile(): void
38 38
     {
39 39
         $ttl = time() + self::DEFAULT_TTL;
40
-        $value = $ttl . 's:3:"bar";';
40
+        $value = $ttl.'s:3:"bar";';
41 41
         $path = self::DEFAULT_PATH;
42 42
 
43 43
         $this->files->shouldReceive('read')->with($path)->andReturn($value);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $path = self::DEFAULT_PATH;
62 62
 
63
-        $this->files->shouldReceive('read')->with($path)->andReturn(time() . 's:3:"bar";');
63
+        $this->files->shouldReceive('read')->with($path)->andReturn(time().'s:3:"bar";');
64 64
         $this->files->shouldReceive('exists')->with($path)->andReturn(true);
65 65
         $this->files->shouldReceive('delete')->with($path)->andReturnTrue();
66 66
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function testGetsWithExistsValueWithDeadValue(): void
71 71
     {
72 72
         $ttl = time() + self::DEFAULT_TTL;
73
-        $value = $ttl . 's:3:"barbar";';
73
+        $value = $ttl.'s:3:"barbar";';
74 74
         $path = self::DEFAULT_PATH;
75 75
 
76 76
         $this->files->shouldReceive('read')->with($path)->andReturn($value);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     public function testSetsWithDefaultTTL(): void
84 84
     {
85 85
         $ttl = time() + self::DEFAULT_TTL;
86
-        $value = $ttl . 's:3:"bar";';
86
+        $value = $ttl.'s:3:"bar";';
87 87
 
88 88
         $this->files->shouldReceive('write')->with(self::DEFAULT_PATH, $value, null, true)->andReturnTrue();
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public function testSetsWithTTLInSeconds(): void
94 94
     {
95 95
         $ttl = time() + 30;
96
-        $value = $ttl . 's:3:"bar";';
96
+        $value = $ttl.'s:3:"bar";';
97 97
 
98 98
         $this->files->shouldReceive('write')->with(self::DEFAULT_PATH, $value, null, true)->andReturnTrue();
99 99
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     public function testSetsWithTTLInDateInterval(): void
104 104
     {
105 105
         $ttl = time() + 30;
106
-        $value = $ttl . 's:3:"bar";';
106
+        $value = $ttl.'s:3:"bar";';
107 107
 
108 108
         $this->files->shouldReceive('write')->with(self::DEFAULT_PATH, $value, null, true)->andReturnTrue();
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function testSetsWithTTLInDateTime(): void
114 114
     {
115 115
         $ttl = time() + 30;
116
-        $value = $ttl . 's:3:"bar";';
116
+        $value = $ttl.'s:3:"bar";';
117 117
 
118 118
         $this->files->shouldReceive('write')->with(self::DEFAULT_PATH, $value, null, true)->andReturnTrue();
119 119
 
@@ -160,15 +160,15 @@  discard block
 block discarded – undo
160 160
     {
161 161
         $this->files->shouldReceive('read')->with(
162 162
             'path/to/cache/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'
163
-        )->andReturn((time() + self::DEFAULT_TTL) . 's:3:"abc";');
163
+        )->andReturn((time() + self::DEFAULT_TTL).'s:3:"abc";');
164 164
 
165 165
         $this->files->shouldReceive('read')->with(
166 166
             'path/to/cache/62/cd/62cdb7020ff920e5aa642c3d4066950dd1f01f4d'
167
-        )->andReturn((time() + self::DEFAULT_TTL) . 's:3:"cde";');
167
+        )->andReturn((time() + self::DEFAULT_TTL).'s:3:"cde";');
168 168
 
169 169
         $this->files->shouldReceive('read')->with(
170 170
             'path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2'
171
-        )->andReturn((time() + -1) . 's:3:"efg";');
171
+        )->andReturn((time() + -1).'s:3:"efg";');
172 172
         $this->files->shouldReceive('exists')->with(
173 173
             'path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2'
174 174
         )->andReturnFalse();
@@ -185,15 +185,15 @@  discard block
 block discarded – undo
185 185
         $ttl = time() + self::DEFAULT_TTL;
186 186
 
187 187
         $this->files->shouldReceive('write')
188
-            ->with('path/to/cache/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', $ttl . 's:3:"baz";', null, true)
188
+            ->with('path/to/cache/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', $ttl.'s:3:"baz";', null, true)
189 189
             ->andReturnTrue();
190 190
 
191 191
         $this->files->shouldReceive('write')
192
-            ->with('path/to/cache/62/cd/62cdb7020ff920e5aa642c3d4066950dd1f01f4d', $ttl . 's:3:"foo";', null, true)
192
+            ->with('path/to/cache/62/cd/62cdb7020ff920e5aa642c3d4066950dd1f01f4d', $ttl.'s:3:"foo";', null, true)
193 193
             ->andReturnTrue();
194 194
 
195 195
         $this->files->shouldReceive('write')
196
-            ->with('path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2', $ttl . 's:3:"bar";', null, true)
196
+            ->with('path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2', $ttl.'s:3:"bar";', null, true)
197 197
             ->andReturnTrue();
198 198
 
199 199
         self::assertTrue($this->storage->setMultiple([
@@ -208,15 +208,15 @@  discard block
 block discarded – undo
208 208
         $ttl = time() + 30;
209 209
 
210 210
         $this->files->shouldReceive('write')
211
-            ->with('path/to/cache/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', $ttl . 's:3:"baz";', null, true)
211
+            ->with('path/to/cache/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', $ttl.'s:3:"baz";', null, true)
212 212
             ->andReturnTrue();
213 213
 
214 214
         $this->files->shouldReceive('write')
215
-            ->with('path/to/cache/62/cd/62cdb7020ff920e5aa642c3d4066950dd1f01f4d', $ttl . 's:3:"foo";', null, true)
215
+            ->with('path/to/cache/62/cd/62cdb7020ff920e5aa642c3d4066950dd1f01f4d', $ttl.'s:3:"foo";', null, true)
216 216
             ->andReturnTrue();
217 217
 
218 218
         $this->files->shouldReceive('write')
219
-            ->with('path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2', $ttl . 's:3:"bar";', null, true)
219
+            ->with('path/to/cache/bb/e9/bbe960a25ea311d21d40669e93df2003ba9b90a2', $ttl.'s:3:"bar";', null, true)
220 220
             ->andReturnTrue();
221 221
 
222 222
         self::assertTrue($this->storage->setMultiple([
Please login to merge, or discard this patch.
src/Encrypter/tests/EncrypterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         self::assertNotSame('test string', $encrypted);
54 54
         self::assertEquals('test string', $encrypter->decrypt($encrypted));
55 55
 
56
-        $encrypter->decrypt('badData.' . $encrypted);
56
+        $encrypter->decrypt('badData.'.$encrypted);
57 57
     }
58 58
 
59 59
     public function testBadKey(): void
Please login to merge, or discard this patch.
src/Boot/tests/Environment/DebugModeTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
 
35 35
         self::assertSame($expected, $enum);
36 36
 
37
-        if ($enum === DebugMode::Enabled) {
37
+        if ($enum === DebugMode::Enabled){
38 38
             self::assertTrue($enum->isEnabled());
39
-        } else {
39
+        }else{
40 40
             self::assertFalse($enum->isEnabled());
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,12 @@
 block discarded – undo
34 34
 
35 35
         self::assertSame($expected, $enum);
36 36
 
37
-        if ($enum === DebugMode::Enabled) {
37
+        if ($enum === DebugMode::Enabled)
38
+        {
38 39
             self::assertTrue($enum->isEnabled());
39
-        } else {
40
+        }
41
+        else
42
+        {
40 43
             self::assertFalse($enum->isEnabled());
41 44
         }
42 45
     }
Please login to merge, or discard this patch.
src/Boot/tests/FunctionsTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $core = TestCore::create([
20 20
             'root'   => __DIR__,
21
-            'config' => __DIR__ . '/config',
21
+            'config' => __DIR__.'/config',
22 22
         ])->run();
23 23
 
24 24
         /** @var ContainerInterface $c */
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $core = TestCore::create([
35 35
             'root'   => __DIR__,
36
-            'config' => __DIR__ . '/config',
36
+            'config' => __DIR__.'/config',
37 37
         ])->run(new Environment([
38 38
             'key' => '(true)',
39 39
         ]));
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $core = TestCore::create([
52 52
             'root'   => __DIR__,
53
-            'config' => __DIR__ . '/config',
53
+            'config' => __DIR__.'/config',
54 54
         ])->run();
55 55
 
56 56
         /** @var ContainerInterface $c */
57 57
         $c = $core->getContainer();
58 58
 
59 59
         ContainerScope::runScope($c, function (): void {
60
-            $this->assertDir(__DIR__ . '/config', directory('config'));
60
+            $this->assertDir(__DIR__.'/config', directory('config'));
61 61
         });
62 62
     }
63 63
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $core = TestCore::create([
76 76
             'root'   => __DIR__,
77
-            'config' => __DIR__ . '/config',
77
+            'config' => __DIR__.'/config',
78 78
         ])->run();
79 79
 
80 80
         /** @var ContainerInterface $c */
@@ -102,6 +102,6 @@  discard block
 block discarded – undo
102 102
     private function assertDir($path, $value): void
103 103
     {
104 104
         $path = str_replace(['\\', '//'], '/', $path);
105
-        self::assertSame(rtrim($path, '/') . '/', $value);
105
+        self::assertSame(rtrim($path, '/').'/', $value);
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
src/Boot/tests/MemoryTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $core = TestCore::create([
16 16
             'root'  => __DIR__,
17
-            'cache' => __DIR__ . '/cache'
17
+            'cache' => __DIR__.'/cache'
18 18
         ])->run();
19 19
 
20 20
         /** @var MemoryInterface $memory */
21 21
         $memory = $core->getContainer()->get(MemoryInterface::class);
22 22
 
23 23
         $memory->saveData('test', 'data');
24
-        self::assertFileExists(__DIR__ . '/cache/test.php');
24
+        self::assertFileExists(__DIR__.'/cache/test.php');
25 25
         self::assertSame('data', $memory->loadData('test'));
26 26
 
27
-        unlink(__DIR__ . '/cache/test.php');
27
+        unlink(__DIR__.'/cache/test.php');
28 28
         self::assertNull($memory->loadData('test'));
29 29
     }
30 30
 
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $core = TestCore::create([
34 34
             'root'  => __DIR__,
35
-            'cache' => __DIR__ . '/cache'
35
+            'cache' => __DIR__.'/cache'
36 36
         ])->run();
37 37
 
38 38
         /** @var MemoryInterface $memory */
39 39
         $memory = $core->getContainer()->get(MemoryInterface::class);
40 40
 
41
-        file_put_contents(__DIR__ . '/cache/test.php', '<?php broken');
41
+        file_put_contents(__DIR__.'/cache/test.php', '<?php broken');
42 42
         self::assertNull($memory->loadData('test'));
43 43
 
44
-        unlink(__DIR__ . '/cache/test.php');
44
+        unlink(__DIR__.'/cache/test.php');
45 45
         self::assertNull($memory->loadData('test'));
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Boot/tests/DirectoriesTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 
26 26
         $this->assertDir(__DIR__, $dirs->get('root'));
27 27
 
28
-        $this->assertDir(__DIR__ . '/app', $dirs->get('app'));
28
+        $this->assertDir(__DIR__.'/app', $dirs->get('app'));
29 29
 
30
-        $this->assertDir(__DIR__ . '/public', $dirs->get('public'));
30
+        $this->assertDir(__DIR__.'/public', $dirs->get('public'));
31 31
 
32
-        $this->assertDir(__DIR__ . '/app/config', $dirs->get('config'));
33
-        $this->assertDir(__DIR__ . '/app/resources', $dirs->get('resources'));
32
+        $this->assertDir(__DIR__.'/app/config', $dirs->get('config'));
33
+        $this->assertDir(__DIR__.'/app/resources', $dirs->get('resources'));
34 34
 
35
-        $this->assertDir(__DIR__ . '/runtime', $dirs->get('runtime'));
36
-        $this->assertDir(__DIR__ . '/runtime/cache', $dirs->get('cache'));
35
+        $this->assertDir(__DIR__.'/runtime', $dirs->get('runtime'));
36
+        $this->assertDir(__DIR__.'/runtime/cache', $dirs->get('cache'));
37 37
     }
38 38
 
39 39
     public function testKernelException(): void
@@ -94,6 +94,6 @@  discard block
 block discarded – undo
94 94
     private function assertDir($path, $value): void
95 95
     {
96 96
         $path = str_replace(['\\', '//'], '/', $path);
97
-        self::assertSame(rtrim($path, '/') . '/', $value);
97
+        self::assertSame(rtrim($path, '/').'/', $value);
98 98
     }
99 99
 }
Please login to merge, or discard this patch.