From c140d5883c6213534e41e031196fbf3cd9e8c408 Mon Sep 17 00:00:00 2001 From: Jens True Date: Fri, 16 Jun 2023 08:08:09 +0000 Subject: [PATCH] Always improving --- tests/Notification/NtfyTest.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/Notification/NtfyTest.php b/tests/Notification/NtfyTest.php index 765659f..77cee4c 100644 --- a/tests/Notification/NtfyTest.php +++ b/tests/Notification/NtfyTest.php @@ -2,23 +2,16 @@ use PHPUnit\Framework\TestCase; use App\Notification\Ntfy; - -use Ntfy\Server; use Ntfy\Client; use Ntfy\Message; + final class NtfyTest extends TestCase { - /** - * @doesNotPerformAssertions - */ - public function testDoesSomething(): void + public function testSend(): void { - //Dependency - $client = $this->createStub(Client::class); - + $client = $this->createMock(Client::class); $sut = new Ntfy($client); - - $client->expects($this->once())->method('send'); + $client->expects($this->once())->method('send')->with($this->isInstanceOf(Message::class)); $sut->send('title','text'); } } \ No newline at end of file