You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-06 04:52:56 +01:00
fix laravel adapters tests
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Flasher\Laravel\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Flasher\Prime\Config\ConfigInterface;
|
||||
use Flasher\Prime\FlasherInterface;
|
||||
use Flasher\Prime\Renderer\RendererInterface;
|
||||
@@ -40,12 +41,12 @@ final class SessionMiddleware
|
||||
/**
|
||||
* Run the request filter.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param Request $request
|
||||
* @param Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next)
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
/**
|
||||
* @var Response $response
|
||||
@@ -74,11 +75,10 @@ final class SessionMiddleware
|
||||
|
||||
$content = $response->getContent();
|
||||
|
||||
$htmlResponse = $this->renderer->render(array(),
|
||||
array(
|
||||
'format' => 'html',
|
||||
'content' => $content,
|
||||
));
|
||||
$htmlResponse = $this->renderer->render(array(), array(
|
||||
'format' => 'html',
|
||||
'content' => $content,
|
||||
));
|
||||
|
||||
if (empty($htmlResponse)) {
|
||||
return $response;
|
||||
|
||||
@@ -8,24 +8,13 @@ final class FlasherServiceProviderTest extends TestCase
|
||||
{
|
||||
public function testNotifyServiceExists()
|
||||
{
|
||||
$this->assertTrue($this->app->bound('flasher'));
|
||||
$this->assertTrue($this->app->bound('flasher.renderer'));
|
||||
$this->assertTrue($this->app->bound('flasher.storage'));
|
||||
$this->assertTrue($this->app->bound('flasher.storage_manager'));
|
||||
$this->assertTrue($this->app->bound('flasher.event_dispatcher'));
|
||||
$this->assertTrue($this->app->bound('flasher.filter'));
|
||||
$this->assertTrue($this->app->bound('flasher.config'));
|
||||
}
|
||||
|
||||
public function testNotifyManagerGetConfig()
|
||||
{
|
||||
$notify = $this->app->make('flasher');
|
||||
|
||||
$reflection = new \ReflectionClass(get_class($notify));
|
||||
$config = $reflection->getProperty('config');
|
||||
$config->setAccessible(true);
|
||||
|
||||
$this->assertInstanceOf('Flasher\Prime\Config\ConfigInterface', $config->getValue($notify));
|
||||
$this->assertInstanceOf('Flasher\Laravel\Config\Config', $this->app->make('flasher.config'));
|
||||
$this->assertInstanceOf('Flasher\Prime\Flasher', $this->app->make('flasher'));
|
||||
$this->assertInstanceOf('Flasher\Prime\Renderer\Renderer', $this->app->make('flasher.renderer'));
|
||||
$this->assertInstanceOf('Flasher\Laravel\Storage\Storage', $this->app->make('flasher.storage'));
|
||||
$this->assertInstanceOf('Flasher\Prime\Storage\StorageManager', $this->app->make('flasher.storage_manager'));
|
||||
$this->assertInstanceOf('Flasher\Prime\EventDispatcher\EventDispatcher', $this->app->make('flasher.event_dispatcher'));
|
||||
$this->assertInstanceOf('Flasher\Prime\Filter\Filter', $this->app->make('flasher.filter'));
|
||||
}
|
||||
|
||||
public function testBladeDirective()
|
||||
|
||||
Reference in New Issue
Block a user