Source of file ControllerTest.php
Size: 0,782 Bytes - Last Modified: 2021-12-23T10:00:22+00:00
/var/www/docs.ssmods.com/process/src/tests/ControllerTest.php
1234567891011121314151617181920212223242526272829303132 | <?php namespace LeKoala\DebugBar\Test; use LeKoala\DebugBar\DebugBar; use SilverStripe\Core\Config\Config; use SilverStripe\Dev\FunctionalTest; class ControllerTest extends FunctionalTest { public function tearDown() { parent::tearDown(); DebugBar::clearDebugBar(); } public function testErrorWhenStorageIsDisabled() { Config::modify()->set(DebugBar::class, 'enable_storage', false); $result = $this->get('/__debugbar'); $this->assertEquals(404, $result->getStatusCode()); } public function testErrorWhenModuleIsDisabled() { Config::modify()->set(DebugBar::class, 'disabled', true); $result = $this->get('/__debugbar'); $this->assertEquals(404, $result->getStatusCode()); } } |