mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Merge pull request #25 from stojg/fix-tests-for-31
Fix unittests for 3.1rc
This commit is contained in:
commit
689116bcd2
@ -149,7 +149,7 @@ class FilesystemPublisherTest extends SapphireTest {
|
||||
//We can set the static_publishing theme to something completely different:
|
||||
//Static publishing will use this one instead of the current_custom_theme if it is not false
|
||||
Config::inst()->update('StaticPublisher', 'static_publisher_theme', 'otherTheme');
|
||||
$current_theme = StaticPublisher::static_publisher_theme();
|
||||
$current_theme = Config::inst()->get('StaticPublisher', 'static_publisher_theme');
|
||||
|
||||
$this->assertNotEquals($current_theme, $default_theme, 'The static publisher theme overrides the custom theme');
|
||||
}
|
||||
@ -229,10 +229,15 @@ class StaticPublisherTestPage extends Page implements TestOnly {
|
||||
/**
|
||||
* @package staticpublisher
|
||||
*/
|
||||
class StaticPublisherTestPage_Controller extends Page_Controller {
|
||||
class StaticPublisherTestPage_Controller extends Page_Controller implements TestOnly {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $allowed_actions = array('json');
|
||||
|
||||
public function json(SS_HTTPRequest $request) {
|
||||
|
||||
$response = new SS_HTTPResponse('{"firstName": "John"}');
|
||||
$response->addHeader('Content-Type', 'application/json');
|
||||
return $response;
|
||||
|
Loading…
Reference in New Issue
Block a user