mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Improve NotificationMailerTest by adding an assertion
This assertion is performed by Prophecy's shouldBeCalled* method.
This commit is contained in:
@@ -37,7 +37,6 @@ class NotificationMailerTest extends TestCase
|
||||
*/
|
||||
public function testPostPersistComment(): void
|
||||
{
|
||||
$this->expectNotToPerformAssertions();
|
||||
$user1 = (new User())->setEmail('user1@foo.com');
|
||||
$user2 = (new User())->setEmail('user2@foo.com');
|
||||
$user3 = (new User())->setEmail('user3@foo.com');
|
||||
@@ -67,7 +66,7 @@ class NotificationMailerTest extends TestCase
|
||||
}
|
||||
|
||||
return false;
|
||||
}));
|
||||
}))->shouldBeCalledTimes(2);
|
||||
|
||||
$objectManager = $this->prophesize(EntityManagerInterface::class);
|
||||
|
||||
@@ -77,7 +76,6 @@ class NotificationMailerTest extends TestCase
|
||||
|
||||
public function testPostPersistCommentDestWithNullEmail(): void
|
||||
{
|
||||
$this->expectNotToPerformAssertions();
|
||||
$user1 = (new User())->setEmail('user1@foo.com');
|
||||
$user2 = (new User())->setEmail('user2@foo.com');
|
||||
$user3 = (new User())->setEmail(null);
|
||||
@@ -107,7 +105,7 @@ class NotificationMailerTest extends TestCase
|
||||
}
|
||||
|
||||
return false;
|
||||
}));
|
||||
}))->shouldBeCalledTimes(1);
|
||||
|
||||
$objectManager = $this->prophesize(EntityManagerInterface::class);
|
||||
|
||||
|
Reference in New Issue
Block a user