diff --git a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php index 0f64fbc8eaffe..27b998b3646f4 100644 --- a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php @@ -53,6 +53,8 @@ public function testUnsupportedShellOption() public function testAdditionalShellSupport() { + $this->expectNotToPerformAssertions(); + $this->command = new CompleteCommand(['supported' => BashCompletionOutput::class]); $this->command->setApplication($this->application); $this->tester = new CommandTester($this->command); @@ -61,8 +63,6 @@ public function testAdditionalShellSupport() // verify that the default set of shells is still supported $this->execute(['--shell' => 'bash', '--current' => '1', '--input' => ['bin/console']]); - - $this->assertTrue(true); } /** diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index 3b3caa5e3f789..4ea83932c0fe7 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -27,11 +27,10 @@ protected function setUp(): void */ public function testRewindOnFtp() { - $i = new RecursiveDirectoryIterator('ftp://speedtest:speedtest@ftp.otenet.gr/', \RecursiveDirectoryIterator::SKIP_DOTS); + $this->expectNotToPerformAssertions(); + $i = new RecursiveDirectoryIterator('ftp://speedtest:speedtest@ftp.otenet.gr/', \RecursiveDirectoryIterator::SKIP_DOTS); $i->rewind(); - - $this->assertTrue(true); } /** diff --git a/src/Symfony/Component/Mailer/Tests/MailerTest.php b/src/Symfony/Component/Mailer/Tests/MailerTest.php index bcf7520312fa9..602aed403928e 100644 --- a/src/Symfony/Component/Mailer/Tests/MailerTest.php +++ b/src/Symfony/Component/Mailer/Tests/MailerTest.php @@ -86,6 +86,8 @@ public function dispatch($message, array $stamps = []): Envelope public function testRejectMessage() { + $this->expectNotToPerformAssertions(); + $dispatcher = new EventDispatcher(); $dispatcher->addListener(MessageEvent::class, fn (MessageEvent $event) => $event->reject(), 255); $dispatcher->addListener(MessageEvent::class, fn () => throw new \RuntimeException('Should never be called.')); @@ -111,6 +113,5 @@ public function __toString(): string $message = new RawMessage(''); $envelope = new MailerEnvelope(new Address('fabien@example.com'), [new Address('helene@example.com')]); $mailer->send($message, $envelope); - $this->assertTrue(true); } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php index 253529444d237..3ff24eb944be7 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php @@ -213,8 +213,9 @@ public function testApiError() */ public function testApiErrorSkipped(NotCompromisedPassword $constraint) { + $this->expectNotToPerformAssertions(); + $this->validator->validate(self::PASSWORD_TRIGGERING_AN_ERROR, $constraint); - $this->assertTrue(true); // No exception have been thrown } public static function provideErrorSkippingConstraints(): iterable