1
0
mirror of https://github.com/silverstripe/silverstripe-framework synced 2024-10-22 12:05:37 +00:00

27 lines
684 B
PHP
Raw Normal View History

<?php
2016-10-14 14:30:05 +13:00
namespace SilverStripe\Control\Tests;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Kernel;
use SilverStripe\Control\Tests\FlushMiddlewareTest\TestFlushable;
2016-10-14 14:30:05 +13:00
use SilverStripe\Dev\FunctionalTest;
class FlushMiddlewareTest extends FunctionalTest
{
/**
* Assert that classes that implement flushable are called
*/
public function testImplementorsAreCalled()
{
TestFlushable::$flushed = false;
Injector::inst()->get(Kernel::class)->boot(true);
$this->get('/');
$this->assertTrue(TestFlushable::$flushed);
// reset the kernel Flush flag
Injector::inst()->get(Kernel::class)->boot();
}
}