@@ -33,20 +33,20 @@ public function testEncryptionHappensOnOnlyAnnotatedFields(): void
3333 $ connection = $ em ->getConnection ();
3434 $ stmt = $ connection ->prepare ('SELECT * from owner WHERE id = ? ' );
3535 $ owners = $ em ->getRepository (Owner::class)->findAll ();
36- $ this -> assertCount (1 , $ owners );
36+ static :: assertCount (1 , $ owners );
3737 /** @var Owner $owner */
3838 $ owner = $ owners [0 ];
39- $ this -> assertEquals ($ secret , $ owner ->getSecret ());
40- $ this -> assertEquals ($ notSecret , $ owner ->getNotSecret ());
39+ static :: assertEquals ($ secret , $ owner ->getSecret ());
40+ static :: assertEquals ($ notSecret , $ owner ->getNotSecret ());
4141 $ stmt ->bindValue (1 , $ owner ->getId ());
4242 $ results = $ this ->executeStatementFetchAll ($ stmt );
4343 $ this ->assertCount (1 , $ results );
4444 $ result = $ results [0 ];
45- $ this -> assertEquals ($ notSecret , $ result ['notSecret ' ]);
45+ static :: assertEquals ($ notSecret , $ result ['notSecret ' ]);
4646 $ this ->assertNotEquals ($ secret , $ result ['secret ' ]);
4747 $ this ->assertStringEndsWith ('<ENC> ' , $ result ['secret ' ]);
4848 $ decrypted = $ this ->encryptor ->decrypt (str_replace ('<ENC> ' , '' , $ result ['secret ' ]));
49- $ this -> assertEquals ($ secret , $ decrypted );
49+ static :: assertEquals ($ secret , $ decrypted );
5050 }
5151
5252 public function testEncryptionCascades (): void
@@ -73,17 +73,17 @@ public function testEncryptionCascades(): void
7373 $ this ->assertCount (1 , $ cascadeTargets );
7474 /** @var CascadeTarget $cascadeTarget */
7575 $ cascadeTarget = $ cascadeTargets [0 ];
76- $ this -> assertEquals ($ secret , $ cascadeTarget ->getSecret ());
77- $ this -> assertEquals ($ notSecret , $ cascadeTarget ->getNotSecret ());
76+ static :: assertEquals ($ secret , $ cascadeTarget ->getSecret ());
77+ static :: assertEquals ($ notSecret , $ cascadeTarget ->getNotSecret ());
7878 $ stmt ->bindValue (1 , $ cascadeTarget ->getId ());
7979 $ results = $ this ->executeStatementFetchAll ($ stmt );
8080 $ this ->assertCount (1 , $ results );
8181 $ result = $ results [0 ];
82- $ this -> assertEquals ($ notSecret , $ result ['notSecret ' ]);
82+ static :: assertEquals ($ notSecret , $ result ['notSecret ' ]);
8383 $ this ->assertNotEquals ($ secret , $ result ['secret ' ]);
8484 $ this ->assertStringEndsWith ('<ENC> ' , $ result ['secret ' ]);
8585 $ decrypted = $ this ->encryptor ->decrypt (str_replace ('<ENC> ' , '' , $ result ['secret ' ]));
86- $ this -> assertEquals ($ secret , $ decrypted );
86+ static :: assertEquals ($ secret , $ decrypted );
8787 }
8888
8989 public function testEncryptionClassTableInheritance (): void
@@ -171,16 +171,16 @@ public function testEncryptionDoesNotHappenWhenThereIsNoChange(): void
171171 $ owners = $ em ->getRepository (Owner::class)->findAll ();
172172 /** @var Owner $owner */
173173 foreach ($ owners as $ owner ) {
174- $ this -> assertEquals ($ secret , $ owner ->getSecret ());
175- $ this -> assertEquals ($ notSecret , $ owner ->getNotSecret ());
174+ static :: assertEquals ($ secret , $ owner ->getSecret ());
175+ static :: assertEquals ($ notSecret , $ owner ->getNotSecret ());
176176 }
177177 $ this ->resetQueryStack ();
178178 $ this ->assertCount (0 , $ this ->getDebugQueries ());
179179 $ beforeFlush = $ this ->subscriber ->encryptCounter ;
180180 $ em ->flush ();
181181 $ afterFlush = $ this ->subscriber ->encryptCounter ;
182182 // No encryption should have happened because we didn't change anything.
183- $ this -> assertEquals ($ beforeFlush , $ afterFlush );
183+ static :: assertEquals ($ beforeFlush , $ afterFlush );
184184 // No queries happened because we didn't change anything.
185185 $ this ->assertCount (0 , $ this ->getDebugQueries (), "Unexpected queries: \n" .var_export ($ this ->getDebugQueries (), true ));
186186
@@ -189,7 +189,7 @@ public function testEncryptionDoesNotHappenWhenThereIsNoChange(): void
189189 $ em ->flush ();
190190 $ afterFlush = $ this ->subscriber ->encryptCounter ;
191191 // No encryption should have happened because we didn't change anything.
192- $ this -> assertEquals ($ beforeFlush , $ afterFlush );
192+ static :: assertEquals ($ beforeFlush , $ afterFlush );
193193 // No queries happened because we didn't change anything.
194194 $ this ->assertCount (0 , $ this ->getDebugQueries (), "Unexpected queries: \n" .var_export ($ this ->getDebugQueries (), true ));
195195
@@ -199,7 +199,7 @@ public function testEncryptionDoesNotHappenWhenThereIsNoChange(): void
199199 $ result = $ results [0 ];
200200 $ shouldBeTheSameAsBefore = $ result ['secret ' ];
201201 $ this ->assertStringEndsWith ('<ENC> ' , $ shouldBeTheSameAsBefore ); // is encrypted
202- $ this -> assertEquals ($ originalEncryption , $ shouldBeTheSameAsBefore );
202+ static :: assertEquals ($ originalEncryption , $ shouldBeTheSameAsBefore );
203203 }
204204
205205 public function testEncryptionDoesNotHappenWhenThereIsNoChangeClassInheritance (): void
@@ -332,7 +332,7 @@ public function testEntitySetterUseStrtoupper()
332332
333333 $ this ->assertStringEndsWith (DoctrineEncryptSubscriber::ENCRYPTION_MARKER , $ passwordData );
334334 $ this ->assertStringDoesNotContain ('my secret ' , $ passwordData );
335- $ this -> assertEquals ('MY SECRET ' , $ secret );
335+ static :: assertEquals ('MY SECRET ' , $ secret );
336336 }
337337
338338 public function testEntityWithDateTimeJsonAndArrayProperties ()
@@ -361,7 +361,7 @@ public function testEntityWithDateTimeJsonAndArrayProperties()
361361 // Doctrine datetime type is only for date and time. milliseconds and timezone is not stored.
362362 // We only test the date and time accordingly
363363 // https://www.doctrine-project.org/projects/doctrine-dbal/en/3.7/reference/types.html#datetime
364- $ this -> assertEquals ($ datetime ->format ('Y-m-d \\TH:i:s ' ), $ entityDate ->format ('Y-m-d \\TH:i:s ' ));
365- $ this -> assertEquals ($ jsonArray , $ entityJson );
364+ static :: assertEquals ($ datetime ->format ('Y-m-d \\TH:i:s ' ), $ entityDate ->format ('Y-m-d \\TH:i:s ' ));
365+ static :: assertEquals ($ jsonArray , $ entityJson );
366366 }
367367}
0 commit comments