You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 12:32:55 +01:00
49 lines
1.2 KiB
PHP
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();
|
|
}
|
|
}
|