2014-10-13 10:10:57 +02:00
|
|
|
<?php
|
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\Control\Tests;
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2017-06-23 02:29:11 +02:00
|
|
|
use SilverStripe\Control\Tests\FlushMiddlewareTest\TestFlushable;
|
2016-10-14 03:30:05 +02:00
|
|
|
use SilverStripe\Dev\FunctionalTest;
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2017-06-23 02:29:11 +02:00
|
|
|
class FlushMiddlewareTest extends FunctionalTest
|
2016-12-16 05:34:21 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Assert that classes that implement flushable are called
|
|
|
|
*/
|
|
|
|
public function testImplementorsAreCalled()
|
|
|
|
{
|
2017-01-25 23:34:39 +01:00
|
|
|
TestFlushable::$flushed = false;
|
2016-12-16 05:34:21 +01:00
|
|
|
$this->get('?flush=1');
|
2017-01-25 23:34:39 +01:00
|
|
|
$this->assertTrue(TestFlushable::$flushed);
|
2016-12-16 05:34:21 +01:00
|
|
|
}
|
2014-10-13 10:10:57 +02:00
|
|
|
}
|