4141
4242class BuilderTest extends TestCase
4343{
44- use IsMacroable, MockeryPHPUnitIntegration;
44+ use IsMacroable;
45+ use MockeryPHPUnitIntegration;
4546
4647 /**
4748 * @var ClassMetadataBuilder
@@ -549,8 +550,9 @@ public function test_has_one_implies_an_inverse_one_to_one()
549550
550551 $ result = $ this ->builder ->getClassMetadata ()->associationMappings ['one ' ];
551552
552- $ this ->assertFalse ($ result ['isOwningSide ' ],
553- "HasOne relation is an inversed one-to-one, but resulted in the owning side. "
553+ $ this ->assertFalse (
554+ $ result ['isOwningSide ' ],
555+ 'HasOne relation is an inversed one-to-one, but resulted in the owning side. '
554556 );
555557 }
556558
@@ -703,21 +705,21 @@ public function test_entity_listeners_can_be_configured_through_a_callable()
703705 [
704706 'class ' => StubEntityListener::class,
705707 'method ' => 'swipeFloor ' ,
706- ]
708+ ],
707709 ], $ this ->fluent ->getClassMetadata ()->entityListeners ['onFlush ' ]);
708710
709711 $ this ->assertEquals ([
710712 [
711713 'class ' => StubEntityListener::class,
712714 'method ' => 'cleanToilet ' ,
713- ]
715+ ],
714716 ], $ this ->fluent ->getClassMetadata ()->entityListeners ['postFlush ' ]);
715717
716718 $ this ->assertEquals ([
717719 [
718720 'class ' => StubEntityListener::class,
719721 'method ' => 'onClear ' ,
720- ]
722+ ],
721723 ], $ this ->fluent ->getClassMetadata ()->entityListeners ['onClear ' ]);
722724 }
723725
@@ -745,8 +747,10 @@ public function test_can_override_many_to_one_association()
745747
746748 $ this ->fluent ->build ();
747749
748- $ this ->assertEquals ('target_id ' ,
749- $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('manyToOne ' )['joinColumns ' ][0 ]['name ' ]);
750+ $ this ->assertEquals (
751+ 'target_id ' ,
752+ $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('manyToOne ' )['joinColumns ' ][0 ]['name ' ]
753+ );
750754 $ this ->assertEquals ('source_id ' , $ this ->fluent ->getClassMetadata ()
751755 ->getAssociationMapping ('manyToOne ' )['joinColumns ' ][0 ]['referencedColumnName ' ]);
752756 }
@@ -761,8 +765,10 @@ public function test_can_override_many_to_many_association()
761765
762766 $ this ->fluent ->build ();
763767
764- $ this ->assertEquals ('custom_table_name ' ,
765- $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('manyToMany ' )['joinTable ' ]['name ' ]);
768+ $ this ->assertEquals (
769+ 'custom_table_name ' ,
770+ $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('manyToMany ' )['joinTable ' ]['name ' ]
771+ );
766772 $ this ->assertEquals ('source_id ' , $ this ->fluent ->getClassMetadata ()
767773 ->getAssociationMapping ('manyToMany ' )['joinTable ' ]['joinColumns ' ][0 ]['name ' ]);
768774 }
@@ -778,7 +784,7 @@ public function test_can_guess_a_one_to_one_relation_name()
778784 try {
779785 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntity ' );
780786 } catch (MappingException $ e ) {
781- $ this ->fail (" Could not find default name for the oneToOne relation. " . $ e ->getMessage ());
787+ $ this ->fail (' Could not find default name for the oneToOne relation. ' . $ e ->getMessage ());
782788 }
783789 }
784790
@@ -793,7 +799,7 @@ public function test_can_guess_a_has_one_relation_name()
793799 try {
794800 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntity ' );
795801 } catch (MappingException $ e ) {
796- $ this ->fail (" Could not find default name for the hasOne relation. " . $ e ->getMessage ());
802+ $ this ->fail (' Could not find default name for the hasOne relation. ' . $ e ->getMessage ());
797803 }
798804 }
799805
@@ -808,7 +814,7 @@ public function test_can_guess_a_belongs_to_relation_name()
808814 try {
809815 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntity ' );
810816 } catch (MappingException $ e ) {
811- $ this ->fail (" Could not find default name for the belongsTo relation. " . $ e ->getMessage ());
817+ $ this ->fail (' Could not find default name for the belongsTo relation. ' . $ e ->getMessage ());
812818 }
813819 }
814820
@@ -823,7 +829,7 @@ public function test_can_guess_a_one_to_many_relation_name()
823829 try {
824830 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntities ' );
825831 } catch (MappingException $ e ) {
826- $ this ->fail (" Could not find default name for the oneToMany relation. " . $ e ->getMessage ());
832+ $ this ->fail (' Could not find default name for the oneToMany relation. ' . $ e ->getMessage ());
827833 }
828834 }
829835
@@ -838,7 +844,7 @@ public function test_can_guess_a_has_many_relation_name()
838844 try {
839845 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntities ' );
840846 } catch (MappingException $ e ) {
841- $ this ->fail (" Could not find default name for the hasMany relation. " . $ e ->getMessage ());
847+ $ this ->fail (' Could not find default name for the hasMany relation. ' . $ e ->getMessage ());
842848 }
843849 }
844850
@@ -853,7 +859,7 @@ public function test_can_guess_a_many_to_many_relation_name()
853859 try {
854860 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntities ' );
855861 } catch (MappingException $ e ) {
856- $ this ->fail (" Could not find default name for the manyToMany relation. " . $ e ->getMessage ());
862+ $ this ->fail (' Could not find default name for the manyToMany relation. ' . $ e ->getMessage ());
857863 }
858864 }
859865
@@ -868,7 +874,7 @@ public function test_can_guess_a_belongs_to_many_relation_name()
868874 try {
869875 $ this ->fluent ->getClassMetadata ()->getAssociationMapping ('fluentEntities ' );
870876 } catch (MappingException $ e ) {
871- $ this ->fail (" Could not find default name for the belongsToMany relation. " . $ e ->getMessage ());
877+ $ this ->fail (' Could not find default name for the belongsToMany relation. ' . $ e ->getMessage ());
872878 }
873879 }
874880
@@ -909,5 +915,8 @@ protected function getMacroableBuilder()
909915
910916class FluentEntity
911917{
912- protected $ id , $ name , $ fluentEntity , $ fluentEntities ;
918+ protected $ id ;
919+ protected $ name ;
920+ protected $ fluentEntity ;
921+ protected $ fluentEntities ;
913922}
0 commit comments