Files
php-flasher/tests/Prime/Factory/NotificationFactoryTest.php
T
2023-02-01 23:03:47 +01:00

49 lines
1.2 KiB
PHP

<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Tests\Prime\Factory;
use Flasher\Prime\Factory\NotificationFactory;
use Flasher\Tests\Prime\TestCase;
class NotificationFactoryTest extends TestCase
{
/**
* @return void
*/
public function testCreateNotificationBuilder()
{
$factory = new NotificationFactory();
$builder = $factory->createNotificationBuilder();
$this->assertInstanceOf('Flasher\Prime\Notification\NotificationBuilderInterface', $builder);
}
/**
* @return void
*/
public function testGetStorageManager()
{
$factory = new NotificationFactory();
$manager = $factory->getStorageManager();
$this->assertInstanceOf('Flasher\Prime\Storage\StorageManagerInterface', $manager);
}
/**
* @return void
*/
public function testDynamicCallToNotificationBuilder()
{
$storageManager = $this->getMockBuilder('Flasher\Prime\Storage\StorageManagerInterface')->getMock();
$storageManager->expects($this->once())->method('add');
$factory = new NotificationFactory($storageManager);
$factory->addCreated();
}
}