mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Reset test state for modified config options
This commit is contained in:
parent
53b2fcd1ea
commit
f574f6d1b2
@ -9,6 +9,7 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
extensions: '%$SilverStripe\Dev\State\ExtensionTestState'
|
extensions: '%$SilverStripe\Dev\State\ExtensionTestState'
|
||||||
flushable: '%$SilverStripe\Dev\State\FlushableTestState'
|
flushable: '%$SilverStripe\Dev\State\FlushableTestState'
|
||||||
requirements: '%$SilverStripe\View\Dev\RequirementsTestState'
|
requirements: '%$SilverStripe\View\Dev\RequirementsTestState'
|
||||||
|
ssviewer: '%$SilverStripe\View\Dev\SSViewerTestState'
|
||||||
---
|
---
|
||||||
Name: kerneltest
|
Name: kerneltest
|
||||||
Before: '*'
|
Before: '*'
|
||||||
|
@ -39,35 +39,29 @@ class ContentNegotiator
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
*
|
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $content_type = '';
|
private static $content_type = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
*
|
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $encoding = 'utf-8';
|
private static $encoding = 'utf-8';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
*
|
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private static $enabled = false;
|
private static $enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
|
||||||
*
|
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected static $current_enabled = null;
|
protected static $current_enabled = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
*
|
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $default_format = 'html';
|
private static $default_format = 'html';
|
||||||
|
30
src/View/Dev/SSViewerTestState.php
Normal file
30
src/View/Dev/SSViewerTestState.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\View\Dev;
|
||||||
|
|
||||||
|
use SilverStripe\Control\ContentNegotiator;
|
||||||
|
use SilverStripe\Dev\SapphireTest;
|
||||||
|
use SilverStripe\Dev\State\TestState;
|
||||||
|
use SilverStripe\View\SSViewer;
|
||||||
|
|
||||||
|
class SSViewerTestState implements TestState
|
||||||
|
{
|
||||||
|
public function setUp(SapphireTest $test)
|
||||||
|
{
|
||||||
|
SSViewer::set_themes(null);
|
||||||
|
SSViewer::setRewriteHashLinksDefault(null);
|
||||||
|
ContentNegotiator::setEnabled(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(SapphireTest $test)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUpOnce($class)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDownOnce($class)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user