mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-30 22:37:42 +02:00
27 lines
684 B
PHP
27 lines
684 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Control\Tests;
|
|
|
|
use SilverStripe\Core\Injector\Injector;
|
|
use SilverStripe\Core\Kernel;
|
|
use SilverStripe\Control\Tests\FlushMiddlewareTest\TestFlushable;
|
|
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();
|
|
}
|
|
}
|