This commit is contained in:
		
							
								
								
									
										24
									
								
								tests/Notification/NtfyTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								tests/Notification/NtfyTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
<?php declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
    {
 | 
			
		||||
        //Dependency
 | 
			
		||||
        $client = $this->createStub(Client::class);
 | 
			
		||||
 | 
			
		||||
        $sut = new Ntfy($client);
 | 
			
		||||
 | 
			
		||||
        $client->expects($this->once())->method('send');
 | 
			
		||||
        $sut->send('title','text');
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user