File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace CodedMonkey \Dirigent \Tests \ImageTests \Standalone ;
66
7+ use PHPUnit \Framework \Attributes \DoesNotPerformAssertions ;
78use PHPUnit \Framework \TestCase ;
89use Testcontainers \Container \GenericContainer ;
910use Testcontainers \Wait \WaitForLog ;
1011
1112class EntrypointTest extends TestCase
1213{
14+ #[DoesNotPerformAssertions]
1315 public function testInit (): void
1416 {
1517 // Running the container without a command must result in a running application.
@@ -18,16 +20,12 @@ public function testInit(): void
1820 ->start ()
1921 ->stop ();
2022
21- $ this ->addToAssertionCount (1 );
22-
2323 // Running the container with the `-init` command must result in a running application.
2424 new GenericContainer ('dirigent-standalone ' )
2525 ->withCommand (['-init ' ])
2626 ->withWait (new WaitForLog ('ready to handle connections ' ))
2727 ->start ()
2828 ->stop ();
29-
30- $ this ->addToAssertionCount (1 );
3129 }
3230
3331 public function testDirigent (): void
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public function testRevealFailsWithInvalidPublicKey(): void
7575 $ sealedData = $ encryption ->seal (self ::DATA );
7676
7777 $ this ->expectException (EncryptionException::class);
78- $ this ->expectExceptionMessage ('Unable to decrypt data ' );
78+ $ this ->expectExceptionMessageIsOrContains ('Unable to decrypt data ' );
7979
8080 $ encryption ->reveal ($ sealedData );
8181 }
@@ -140,7 +140,7 @@ public function testValidateFailsWithInvalidPublicKey(): void
140140 $ publicKey = sodium_crypto_box_publickey (sodium_crypto_box_keypair ());
141141
142142 $ this ->expectException (EncryptionException::class);
143- $ this ->expectExceptionMessage ('The encryption key is not valid. ' );
143+ $ this ->expectExceptionMessageIsOrContains ('The encryption key is not valid. ' );
144144
145145 $ encryption = new Encryption ($ privateKey , $ publicKey , []);
146146
You can’t perform that action at this time.
0 commit comments