Completed
Pull Request — master (#122)
by Christopher
13:42 queued 08:32
created
tests/EdmxTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $edmx = new Edmx();
27 27
         $this->assertTrue($edmx->isOK($msg), $msg);
28 28
         $this->assertNull($msg);
29
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
29
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
30 30
         $serializer =
31 31
             \JMS\Serializer\SerializerBuilder::create()
32 32
                 ->addMetadataDir($ymlDir)
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $ds = DIRECTORY_SEPARATOR;
41 41
 
42
-        $goodxsd = dirname(__DIR__) . $ds . 'xsd' . $ds . 'Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd';
42
+        $goodxsd = dirname(__DIR__).$ds.'xsd'.$ds.'Microsoft.Data.Entity.Design.Edmx_3.Fixed.xsd';
43 43
         if (!file_exists($goodxsd)) {
44 44
             return true;
45 45
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     private function checkEdmxSerialiseDeserialiseRoundTrip($ds, $edmx, $msg)
68 68
     {
69
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
69
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
70 70
         $serializer =
71 71
             \JMS\Serializer\SerializerBuilder::create()
72 72
                 ->addMetadataDir($ymlDir)
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->assertNull($msg);
114 114
 
115 115
 
116
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
116
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
117 117
         $serializer =
118 118
             \JMS\Serializer\SerializerBuilder::create()
119 119
                 ->addMetadataDir($ymlDir)
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
         $ds = DIRECTORY_SEPARATOR;
146 146
         $msg = null;
147 147
 
148
-        $docLocation = dirname(__DIR__) . $ds . 'tests' . $ds . 'exampleV3ServiceDocument.xml';
148
+        $docLocation = dirname(__DIR__).$ds.'tests'.$ds.'exampleV3ServiceDocument.xml';
149 149
         $document = file_get_contents($docLocation);
150 150
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\TDataServicesType';
151
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
151
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
152 152
 
153 153
         $serializer =
154 154
             \JMS\Serializer\SerializerBuilder::create()
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
         $ds = DIRECTORY_SEPARATOR;
166 166
         $msg = null;
167 167
 
168
-        $docLocation = dirname(__DIR__) . $ds . 'tests' . $ds . 'exampleV3ServiceMetadata.xml';
168
+        $docLocation = dirname(__DIR__).$ds.'tests'.$ds.'exampleV3ServiceMetadata.xml';
169 169
         $document = file_get_contents($docLocation);
170 170
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx';
171
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
171
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
172 172
 
173 173
         $serializer =
174 174
             \JMS\Serializer\SerializerBuilder::create()
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
         $ds = DIRECTORY_SEPARATOR;
187 187
         $msg = null;
188 188
 
189
-        $docLocation = dirname(__DIR__) . $ds . 'tests' . $ds . 'exampleV3ServiceMetadata.xml';
189
+        $docLocation = dirname(__DIR__).$ds.'tests'.$ds.'exampleV3ServiceMetadata.xml';
190 190
         $document = file_get_contents($docLocation);
191 191
         $this->v3MetadataAgainstXSD($document);
192 192
         $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx';
193
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
193
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
194 194
 
195 195
         $serializer =
196 196
             \JMS\Serializer\SerializerBuilder::create()
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $this->assertNull($msg);
232 232
 
233 233
 
234
-        $ymlDir = dirname(__DIR__) . $ds . 'src' . $ds . 'MetadataV3' . $ds . 'JMSmetadata';
234
+        $ymlDir = dirname(__DIR__).$ds.'src'.$ds.'MetadataV3'.$ds.'JMSmetadata';
235 235
         $serializer =
236 236
             \JMS\Serializer\SerializerBuilder::create()
237 237
                 ->addMetadataDir($ymlDir)
Please login to merge, or discard this patch.
tests/TSchemaTypeTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         for ($i = 0; $i < 100; $i++) {
32 32
             $actualMax = max($type->getRand(), $actualMax);
33 33
         }
34
-        $this->assertTrue($expectedMax >= $actualMax, $actualMax . ' must be less than '.$expectedMax);
34
+        $this->assertTrue($expectedMax >= $actualMax, $actualMax.' must be less than '.$expectedMax);
35 35
     }
36 36
 
37 37
     public function testGetRandMinimum()
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
         for ($i = 0; $i < 100; $i++) {
43 43
             $actualMin = min($type->getRand(), $actualMin);
44 44
         }
45
-        $this->assertTrue($expectedMin <= $actualMin, $actualMin . ' must be less than '.$expectedMin);
45
+        $this->assertTrue($expectedMin <= $actualMin, $actualMin.' must be less than '.$expectedMin);
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
tests/TestTypeTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,14 +187,14 @@  discard block
 block discarded – undo
187 187
     {
188 188
         $bar = m::mock(testType::class);
189 189
         // closure needs to return true to match the matcher and thus trip the andReturn(false) bit
190
-        $bar->shouldReceive('isOK')->with(m::on(function (&$msg) {
190
+        $bar->shouldReceive('isOK')->with(m::on(function(&$msg) {
191 191
             $msg = 'OH NOES!';
192 192
             return true;
193 193
         }))->andReturn(false);
194 194
 
195 195
         $msg = null;
196 196
         $expected = 'OH NOES!';
197
-        $arr = [ $bar ];
197
+        $arr = [$bar];
198 198
 
199 199
         $foo = new testType();
200 200
         $this->assertFalse($foo->isChildArrayOK($arr, $msg), $msg);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $msg = null;
247 247
         $obj = m::mock(testType::class);
248 248
         // closure needs to return true to match the matcher and thus trip the andReturn(false) bit
249
-        $obj->shouldReceive('isOK')->with(m::on(function (&$msg) {
249
+        $obj->shouldReceive('isOK')->with(m::on(function(&$msg) {
250 250
             $msg = null;
251 251
             return true;
252 252
         }))->andReturn(true);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         $msg = null;
260 260
         $obj = m::mock(testType::class);
261 261
         // closure needs to return true to match the matcher and thus trip the andReturn(false) bit
262
-        $obj->shouldReceive('isOK')->with(m::on(function (&$msg) {
262
+        $obj->shouldReceive('isOK')->with(m::on(function(&$msg) {
263 263
             $msg = 'OH NOES!';
264 264
             return true;
265 265
         }))->andReturn(false);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     {
286 286
         $foo = m::mock(testType::class)->makePartial();
287 287
         $foo->shouldReceive('isValidArray')->withAnyArgs()->andReturn(true);
288
-        $foo->shouldReceive('isChildArrayOK')->with(m::any(), m::on(function (&$msg) {
288
+        $foo->shouldReceive('isChildArrayOK')->with(m::any(), m::on(function(&$msg) {
289 289
             $msg = 'OH NOES!';
290 290
             return true;
291 291
         }))->andReturn(false);
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     {
300 300
         $foo = m::mock(testType::class)->makePartial();
301 301
         $foo->shouldReceive('isValidArray')->withAnyArgs()->andReturn(true);
302
-        $foo->shouldReceive('isChildArrayOK')->with(m::any(), m::on(function (&$msg) {
302
+        $foo->shouldReceive('isChildArrayOK')->with(m::any(), m::on(function(&$msg) {
303 303
             $msg = null;
304 304
             return true;
305 305
         }))->andReturn(true);
Please login to merge, or discard this patch.