This commit is contained in:
		@@ -2,23 +2,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use PHPUnit\Framework\TestCase;
 | 
					use PHPUnit\Framework\TestCase;
 | 
				
			||||||
use App\Notification\Ntfy;
 | 
					use App\Notification\Ntfy;
 | 
				
			||||||
 | 
					 | 
				
			||||||
use Ntfy\Server;
 | 
					 | 
				
			||||||
use Ntfy\Client;
 | 
					use Ntfy\Client;
 | 
				
			||||||
use Ntfy\Message;
 | 
					use Ntfy\Message;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
final class NtfyTest extends TestCase
 | 
					final class NtfyTest extends TestCase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    public function testSend(): void
 | 
				
			||||||
     * @doesNotPerformAssertions
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function testDoesSomething(): void
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        //Dependency
 | 
					        $client = $this->createMock(Client::class);
 | 
				
			||||||
        $client = $this->createStub(Client::class);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        $sut = new Ntfy($client);
 | 
					        $sut = new Ntfy($client);
 | 
				
			||||||
 | 
					        $client->expects($this->once())->method('send')->with($this->isInstanceOf(Message::class));
 | 
				
			||||||
        $client->expects($this->once())->method('send');
 | 
					 | 
				
			||||||
        $sut->send('title','text');
 | 
					        $sut->send('title','text');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user