@@ -16,7 +16,7 @@ final class LtreeTest extends TestCase
1616 public function can_create_from_list_of_strings (): void
1717 {
1818 $ ltree = new Ltree (['a ' , 'b ' , 'c ' ]);
19- self :: assertSame ('a.b.c ' , (string ) $ ltree );
19+ $ this -> assertSame ('a.b.c ' , (string ) $ ltree );
2020 }
2121
2222 /**
@@ -67,8 +67,8 @@ public static function provideInvalidStringRepresentation(): iterable
6767 public function can_create_from_string (string $ value , array $ expected ): void
6868 {
6969 $ ltree = Ltree::fromString ($ value );
70- self :: assertSame ($ expected , $ ltree ->getPathFromRoot ());
71- self :: assertSame ($ value , (string ) $ ltree );
70+ $ this -> assertSame ($ expected , $ ltree ->getPathFromRoot ());
71+ $ this -> assertSame ($ value , (string ) $ ltree );
7272 }
7373
7474 /**
@@ -79,7 +79,7 @@ public function can_create_from_string(string $value, array $expected): void
7979 public function can_convert_to_string (string $ expected , array $ value ): void
8080 {
8181 $ ltree = new Ltree ($ value );
82- self :: assertSame ($ expected , (string ) $ ltree );
82+ $ this -> assertSame ($ expected , (string ) $ ltree );
8383 }
8484
8585 /**
@@ -90,10 +90,10 @@ public function can_convert_to_string(string $expected, array $value): void
9090 public function can_serialize_to_json (string $ value , array $ expected ): void
9191 {
9292 $ ltreeFromString = Ltree::fromString ($ value );
93- self :: assertSame ($ expected , $ ltreeFromString ->jsonSerialize ());
93+ $ this -> assertSame ($ expected , $ ltreeFromString ->jsonSerialize ());
9494
9595 $ ltree = new Ltree ($ expected );
96- self :: assertSame ($ expected , $ ltree ->jsonSerialize ());
96+ $ this -> assertSame ($ expected , $ ltree ->jsonSerialize ());
9797 }
9898
9999 /**
@@ -113,15 +113,15 @@ public function can_encode_to_json_array(): void
113113 {
114114 $ ltree = new Ltree (['a ' , 'b ' , 'c ' ]);
115115 $ json = \json_encode ($ ltree , \JSON_THROW_ON_ERROR );
116- self :: assertSame ('["a","b","c"] ' , $ json );
116+ $ this -> assertSame ('["a","b","c"] ' , $ json );
117117 }
118118
119119 #[DataProvider('provideParentRelationship ' )]
120120 #[Test]
121121 public function can_get_parent (Ltree $ child , Ltree $ parent ): void
122122 {
123123 $ ltree = $ child ->getParent ();
124- self :: assertSame ((string ) $ parent , (string ) $ ltree );
124+ $ this -> assertSame ((string ) $ parent , (string ) $ ltree );
125125 }
126126
127127 #[DataProvider('provideParentRelationship ' )]
@@ -130,8 +130,8 @@ public function respect_immutability_when_getting_parent(Ltree $child, Ltree $pa
130130 {
131131 $ childAsString = (string ) $ child ;
132132 $ ltree = $ child ->getParent ();
133- self :: assertNotSame ($ child , $ ltree , 'getParent() should return a new instance ' );
134- self :: assertSame ($ childAsString , (string ) $ child , 'getParent() should not mutate the original instance ' );
133+ $ this -> assertNotSame ($ child , $ ltree , 'getParent() should return a new instance ' );
134+ $ this -> assertSame ($ childAsString , (string ) $ child , 'getParent() should not mutate the original instance ' );
135135 }
136136
137137 /**
@@ -161,10 +161,10 @@ public function throws_exception_when_getting_empty_ltree_parent(): void
161161 public function can_verify_empty_status (): void
162162 {
163163 $ ltree = new Ltree ([]);
164- self :: assertTrue ($ ltree ->isEmpty ());
164+ $ this -> assertTrue ($ ltree ->isEmpty ());
165165
166166 $ ltreeWithNodes = new Ltree (['a ' , 'b ' ]);
167- self :: assertFalse ($ ltreeWithNodes ->isEmpty ());
167+ $ this -> assertFalse ($ ltreeWithNodes ->isEmpty ());
168168 }
169169
170170 #[Test]
@@ -173,9 +173,9 @@ public function can_verify_root_status(): void
173173 $ emptyRoot = new Ltree ([]);
174174 $ root = new Ltree (['a ' ]);
175175 $ notRoot = new Ltree (['a ' , 'b ' ]);
176- self :: assertFalse ($ emptyRoot ->isRoot ());
177- self :: assertTrue ($ root ->isRoot ());
178- self :: assertFalse ($ notRoot ->isRoot ());
176+ $ this -> assertFalse ($ emptyRoot ->isRoot ());
177+ $ this -> assertTrue ($ root ->isRoot ());
178+ $ this -> assertFalse ($ notRoot ->isRoot ());
179179 }
180180
181181 /**
@@ -195,7 +195,7 @@ public function can_verify_relationship(
195195 array $ expected ,
196196 ): void {
197197 foreach ($ expected as $ method => $ value ) {
198- self :: assertSame (
198+ $ this -> assertSame (
199199 $ value ,
200200 $ left ->{$ method }($ right ),
201201 \sprintf ('Failed %s check ' , $ method ),
@@ -476,7 +476,7 @@ public static function provideFamilyRelationshipWithExpectedResults(): iterable
476476 public function can_create_leaf (Ltree $ parent , string $ leaf , Ltree $ expected ): void
477477 {
478478 $ ltree = $ parent ->withLeaf ($ leaf );
479- self :: assertSame ((string ) $ expected , (string ) $ ltree );
479+ $ this -> assertSame ((string ) $ expected , (string ) $ ltree );
480480 }
481481
482482 /**
@@ -488,8 +488,8 @@ public function respects_immutability_when_creating_leaf(Ltree $parent, string $
488488 {
489489 $ parentAsString = (string ) $ parent ;
490490 $ ltree = $ parent ->withLeaf ($ leaf );
491- self :: assertNotSame ($ parent , $ ltree , 'withLeaf() should return a new instance ' );
492- self :: assertSame ($ parentAsString , (string ) $ parent , 'withLeaf() should not mutate the original instance ' );
491+ $ this -> assertNotSame ($ parent , $ ltree , 'withLeaf() should return a new instance ' );
492+ $ this -> assertSame ($ parentAsString , (string ) $ parent , 'withLeaf() should not mutate the original instance ' );
493493 }
494494
495495 /**
0 commit comments