mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
commit
688e22368d
@ -24,7 +24,7 @@ class LeftAndMainTest extends FunctionalTest {
|
||||
public function testSaveTreeNodeSorting() {
|
||||
$this->loginWithPermission('ADMIN');
|
||||
|
||||
$rootPages = DataObject::get('LeftAndMainTest_Object', '"ParentID" = 0'); // implicitly sorted
|
||||
$rootPages = DataObject::get('LeftAndMainTest_Object', '"ParentID" = 0', '"ID"'); // forcing sorting for non-MySQL
|
||||
$siblingIDs = $rootPages->column('ID');
|
||||
$page1 = $rootPages->offsetGet(0);
|
||||
$page2 = $rootPages->offsetGet(1);
|
||||
@ -197,4 +197,4 @@ class LeftAndMainTest_Object extends DataObject implements TestOnly {
|
||||
'Hierarchy'
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class DataListTest extends SapphireTest {
|
||||
}
|
||||
|
||||
function testToNestedArray() {
|
||||
$list = DataList::create('DataObjectTest_TeamComment');
|
||||
$list = DataList::create('DataObjectTest_TeamComment')->sort('ID');
|
||||
$nestedArray = $list->toNestedArray();
|
||||
$expected = array(
|
||||
0=>
|
||||
|
@ -142,7 +142,7 @@ class SecurityTest extends FunctionalTest {
|
||||
|
||||
// Test external redirect
|
||||
$response = $this->doTestLoginForm('noexpiry@silverstripe.com', '1nitialPassword', 'http://myspoofedhost.com');
|
||||
$this->assertNotRegExp('/^' . preg_quote('http://myspoofedhost.com', '/') . '/', $response->getHeader('Location'),
|
||||
$this->assertNotRegExp('/^' . preg_quote('http://myspoofedhost.com', '/') . '/', (string)$response->getHeader('Location'),
|
||||
"Redirection to external links in login form BackURL gets prevented as a measure against spoofing attacks"
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user