Passed
Push — feature/more-precise-NoBeanFou... ( b4ed8d...7d5846 )
by Kevin
04:24
created
tests/TDBMServiceTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
     {
450 450
         $beans = $this->tdbmService->findObjects('person', null, [], 'person.id ASC', [], null, TDBMObject::class);
451 451
 
452
-        $results = $beans->map(function ($item) {
452
+        $results = $beans->map(function($item) {
453 453
             return $item->getProperty('id', 'person');
454 454
         })->toArray();
455 455
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
         // Same test with page
459 459
         $page = $beans->take(0, 2);
460 460
 
461
-        $results = $page->map(function ($item) {
461
+        $results = $page->map(function($item) {
462 462
             return $item->getProperty('id', 'person');
463 463
         })->toArray();
464 464
 
@@ -625,10 +625,10 @@  discard block
 block discarded – undo
625 625
 
626 626
     public function testFindObjectByPkException(): void
627 627
     {
628
-        try{
628
+        try {
629 629
             $bean = $this->tdbmService->findObjectByPk('contact', ['id' => -42], [], false, TDBMObject::class);
630 630
             $this->assertEquals(true, false);
631
-        }catch (NoBeanFoundException $exception){
631
+        } catch (NoBeanFoundException $exception) {
632 632
             $this->assertEquals($exception->getMessage(), "No result found for query on table 'contact' for 'id' = -42");
633 633
             $this->assertEquals($exception->getPrimaryKeys(), ['id' => -42]);
634 634
             $this->assertEquals($exception->getTableName(), 'contact');
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
     public function testFindObjectsMethodWithoutResultIteratorClass(): void
823 823
     {
824 824
         $this->expectException(TDBMInvalidArgumentException::class);
825
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
825
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
826 826
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
827 827
 
828 828
         $tdbmService->findObjects('', null, [], null, [], null, null, self::class);
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
     public function testFindObjectsFromSqlMethodWithoutResultIteratorClass(): void
832 832
     {
833 833
         $this->expectException(TDBMInvalidArgumentException::class);
834
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
834
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
835 835
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
836 836
 
837 837
         $tdbmService->findObjectsFromSql('', '', null, [], null, null, null, self::class);
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
     public function testFindObjectsFromRawSqlMethodWithoutResultIteratorClass(): void
841 841
     {
842 842
         $this->expectException(TDBMInvalidArgumentException::class);
843
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
843
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
844 844
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
845 845
 
846 846
         $tdbmService->findObjectsFromRawSql('', '', [], null, null, null, self::class);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -628,7 +628,7 @@
 block discarded – undo
628 628
         try{
629 629
             $bean = $this->tdbmService->findObjectByPk('contact', ['id' => -42], [], false, TDBMObject::class);
630 630
             $this->assertEquals(true, false);
631
-        }catch (NoBeanFoundException $exception){
631
+        } catch (NoBeanFoundException $exception){
632 632
             $this->assertEquals($exception->getMessage(), "No result found for query on table 'contact' for 'id' = -42");
633 633
             $this->assertEquals($exception->getPrimaryKeys(), ['id' => -42]);
634 634
             $this->assertEquals($exception->getTableName(), 'contact');
Please login to merge, or discard this patch.