mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix merge regressions
This commit is contained in:
parent
982ad569b9
commit
1dcaf36c9b
@ -42,7 +42,7 @@ class DirectorTest extends SapphireTest {
|
||||
// TODO Remove director rule, currently API doesnt allow this
|
||||
|
||||
// Remove base URL override (setting to false reverts to default behaviour)
|
||||
Director::setBaseURL(false);
|
||||
Config::inst()->update('Director', 'alternate_base_url', false);
|
||||
|
||||
// Reinstate the original REQUEST_URI after it was modified by some tests
|
||||
$_SERVER['REQUEST_URI'] = self::$originalRequestURI;
|
||||
@ -80,7 +80,7 @@ class DirectorTest extends SapphireTest {
|
||||
|
||||
$rootURL = Director::protocolAndHost();
|
||||
$_SERVER['REQUEST_URI'] = "$rootURL/mysite/sub-page/";
|
||||
Director::setBaseURL('/mysite/');
|
||||
Config::inst()->update('Director', 'alternate_base_url', '/mysite/');
|
||||
|
||||
// Test already absolute url
|
||||
$this->assertEquals($rootURL, Director::absoluteURL($rootURL));
|
||||
|
@ -11,15 +11,14 @@ class ImageTest extends SapphireTest {
|
||||
protected $origBackend;
|
||||
|
||||
public function setUp() {
|
||||
if(get_class($this) == "ImageTest")
|
||||
$this->skipTest = true;
|
||||
if(get_class($this) == "ImageTest") $this->skipTest = true;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->origBackend = Image::get_backend();
|
||||
|
||||
if($this->skipTest)
|
||||
return;
|
||||
|
||||
$this->origBackend = Image::get_backend();
|
||||
|
||||
if(!file_exists(ASSETS_PATH)) mkdir(ASSETS_PATH);
|
||||
|
||||
@ -34,7 +33,7 @@ class ImageTest extends SapphireTest {
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
Image::set_backend($this->origBackend);
|
||||
if($this->origBackend) Image::set_backend($this->origBackend);
|
||||
|
||||
/* Remove the test files that we've created */
|
||||
$fileIDs = $this->allFixtureIDs('Image');
|
||||
|
@ -133,7 +133,9 @@ class SecurityTest extends FunctionalTest {
|
||||
$this->session()->inst_set('SessionForms.MemberLoginForm.Email', 'myuser@silverstripe.com');
|
||||
Security::config()->remember_username = false;
|
||||
$this->get(Config::inst()->get('Security', 'login_url'));
|
||||
$items = $this->cssParser()->getBySelector('#MemberLoginForm_LoginForm #Email input.text');
|
||||
$items = $this
|
||||
->cssParser()
|
||||
->getBySelector('#MemberLoginForm_LoginForm #MemberLoginForm_LoginForm_Email');
|
||||
$this->assertEquals(1, count($items));
|
||||
$this->assertEmpty((string)$items[0]->attributes()->value);
|
||||
$this->assertEquals('off', (string)$items[0]->attributes()->autocomplete);
|
||||
@ -145,7 +147,9 @@ class SecurityTest extends FunctionalTest {
|
||||
$this->session()->inst_set('SessionForms.MemberLoginForm.Email', 'myuser@silverstripe.com');
|
||||
Security::config()->remember_username = true;
|
||||
$this->get(Config::inst()->get('Security', 'login_url'));
|
||||
$items = $this->cssParser()->getBySelector('#MemberLoginForm_LoginForm #Email input.text');
|
||||
$items = $this
|
||||
->cssParser()
|
||||
->getBySelector('#MemberLoginForm_LoginForm #MemberLoginForm_LoginForm_Email');
|
||||
$this->assertEquals(1, count($items));
|
||||
$this->assertEquals('myuser@silverstripe.com', (string)$items[0]->attributes()->value);
|
||||
$this->assertNotEquals('off', (string)$items[0]->attributes()->autocomplete);
|
||||
|
Loading…
x
Reference in New Issue
Block a user