mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
40 lines
769 B
PHP
40 lines
769 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
namespace SilverStripe\View\Dev;
|
||
|
|
||
|
use SilverStripe\Dev\SapphireTest;
|
||
|
use SilverStripe\Dev\State\TestState;
|
||
|
use SilverStripe\View\Requirements;
|
||
|
use SilverStripe\View\Requirements_Backend;
|
||
|
|
||
|
/**
|
||
|
* Resets requirements for test state
|
||
|
*/
|
||
|
class RequirementsTestState implements TestState
|
||
|
{
|
||
|
/**
|
||
|
* @var Requirements_Backend
|
||
|
*/
|
||
|
protected $backend = null;
|
||
|
|
||
|
public function setUp(SapphireTest $test)
|
||
|
{
|
||
|
$this->backend = Requirements::backend();
|
||
|
Requirements::set_backend(Requirements_Backend::create());
|
||
|
}
|
||
|
|
||
|
public function tearDown(SapphireTest $test)
|
||
|
{
|
||
|
Requirements::set_backend($this->backend);
|
||
|
}
|
||
|
|
||
|
public function setUpOnce($class)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public function tearDownOnce($class)
|
||
|
{
|
||
|
}
|
||
|
}
|