Passed
Push — types ( 4ca76a...182a49 )
by Jonathan
02:35 queued 38s
created
tests/Doctrine/Tests/Persistence/Mapping/SymfonyFileLocatorTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 {
17 17
     public function testGetPaths() : void
18 18
     {
19
-        $path   = __DIR__ . '/_files';
19
+        $path   = __DIR__.'/_files';
20 20
         $prefix = 'Foo';
21 21
 
22 22
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function testGetPrefixes() : void
30 30
     {
31
-        $path   = __DIR__ . '/_files';
31
+        $path   = __DIR__.'/_files';
32 32
         $prefix = 'Foo';
33 33
 
34 34
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function testFileExists() : void
47 47
     {
48
-        $path   = __DIR__ . '/_files';
48
+        $path   = __DIR__.'/_files';
49 49
         $prefix = 'Foo';
50 50
 
51 51
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function testGetAllClassNames() : void
60 60
     {
61
-        $path   = __DIR__ . '/_files';
61
+        $path   = __DIR__.'/_files';
62 62
         $prefix = 'Foo';
63 63
 
64 64
         $locator       = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function testInvalidCustomNamespaceSeparator() : void
81 81
     {
82
-        $path   = __DIR__ . '/_files';
82
+        $path   = __DIR__.'/_files';
83 83
         $prefix = 'Foo';
84 84
 
85 85
         $this->expectException(InvalidArgumentException::class);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function testGetClassNamesWithCustomNsSeparator(string $separator, string $dir) : void
111 111
     {
112
-        $path   = __DIR__ . $dir;
112
+        $path   = __DIR__.$dir;
113 113
         $prefix = 'Foo';
114 114
 
115 115
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator);
@@ -157,29 +157,29 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function testFindMappingFileWithCustomNsSeparator(string $separator, string $dir, array $files) : void
159 159
     {
160
-        $path   = __DIR__ . $dir;
160
+        $path   = __DIR__.$dir;
161 161
         $prefix = 'Foo';
162 162
 
163 163
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml', $separator);
164 164
 
165 165
         foreach ($files as $filePath => $className) {
166
-            self::assertSame(realpath($path . '/' . $filePath), realpath($locator->findMappingFile($className)));
166
+            self::assertSame(realpath($path.'/'.$filePath), realpath($locator->findMappingFile($className)));
167 167
         }
168 168
     }
169 169
 
170 170
     public function testFindMappingFile() : void
171 171
     {
172
-        $path   = __DIR__ . '/_files';
172
+        $path   = __DIR__.'/_files';
173 173
         $prefix = 'Foo';
174 174
 
175 175
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
176 176
 
177
-        self::assertSame(__DIR__ . '/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass'));
177
+        self::assertSame(__DIR__.'/_files/stdClass.yml', $locator->findMappingFile('Foo\\stdClass'));
178 178
     }
179 179
 
180 180
     public function testFindMappingFileNotFound() : void
181 181
     {
182
-        $path   = __DIR__ . '/_files';
182
+        $path   = __DIR__.'/_files';
183 183
         $prefix = 'Foo';
184 184
 
185 185
         $locator = new SymfonyFileLocator([$path => $prefix], '.yml');
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
     {
194 194
         // Low -> High
195 195
         $prefixes                             = [];
196
-        $prefixes[__DIR__ . '/_match_ns']     = 'Foo';
197
-        $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar';
196
+        $prefixes[__DIR__.'/_match_ns']     = 'Foo';
197
+        $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar';
198 198
 
199 199
         $locator = new SymfonyFileLocator($prefixes, '.yml');
200 200
 
201 201
         self::assertSame(
202
-            __DIR__ . '/_match_ns/Bar/barEntity.yml',
202
+            __DIR__.'/_match_ns/Bar/barEntity.yml',
203 203
             $locator->findMappingFile("Foo\\Bar\\barEntity")
204 204
         );
205 205
     }
@@ -207,13 +207,13 @@  discard block
 block discarded – undo
207 207
     public function testFindMappingFileMostSpecificNamespaceFirst() : void
208 208
     {
209 209
         $prefixes                             = [];
210
-        $prefixes[__DIR__ . '/_match_ns/Bar'] = 'Foo\\Bar';
211
-        $prefixes[__DIR__ . '/_match_ns']     = 'Foo';
210
+        $prefixes[__DIR__.'/_match_ns/Bar'] = 'Foo\\Bar';
211
+        $prefixes[__DIR__.'/_match_ns']     = 'Foo';
212 212
 
213 213
         $locator = new SymfonyFileLocator($prefixes, '.yml');
214 214
 
215 215
         self::assertSame(
216
-            __DIR__ . '/_match_ns/Bar/barEntity.yml',
216
+            __DIR__.'/_match_ns/Bar/barEntity.yml',
217 217
             $locator->findMappingFile("Foo\\Bar\\barEntity")
218 218
         );
219 219
     }
Please login to merge, or discard this patch.