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
33 lines
969 B
PHP
33 lines
969 B
PHP
<?php
|
|
|
|
namespace Flasher\Laravel\Tests;
|
|
|
|
use Illuminate\View\Compilers\BladeCompiler;
|
|
|
|
class NotifyServiceProviderTest extends TestCase
|
|
{
|
|
public function test_notify_service_exists()
|
|
{
|
|
$this->assertTrue($this->app->bound('flasher.factory'));
|
|
}
|
|
|
|
public function test_notify_manager_get_config()
|
|
{
|
|
$notify = $this->app->make('flasher.factory');
|
|
|
|
$reflection = new \ReflectionClass(get_class($notify));
|
|
$config = $reflection->getProperty('config');
|
|
$config->setAccessible(true);
|
|
|
|
$this->assertInstanceOf('Flasher\Prime\Config\ConfigInterface', $config->getValue($notify));
|
|
}
|
|
|
|
public function test_blade_directive()
|
|
{
|
|
/** @var BladeCompiler $blade */
|
|
$blade = $this->app->make('view')->getEngineResolver()->resolve('blade')->getCompiler();
|
|
|
|
$this->assertEquals("<?php echo app('flasher.presenter.html')->render(); ?>", $blade->compileString('@notify_render'));
|
|
}
|
|
}
|