mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
BUGFIX: fixed broken test in subsites module that relies on specific numeric IDs
This commit is contained in:
parent
1e58cca92c
commit
d77e9c9415
@ -14,11 +14,13 @@ class SubsiteAdminTest extends SapphireTest {
|
||||
*/
|
||||
function testBasicView() {
|
||||
Subsite::$write_hostmap = false;
|
||||
$subsite1ID = $this->objFromFixture('Subsite','domaintest1')->ID;
|
||||
|
||||
// Open the admin area logged in as admin
|
||||
$response1 = Director::test('admin/subsites/', null, $this->adminLoggedInSession());
|
||||
|
||||
// Confirm that this URL gets you the entire page, with the edit form loaded
|
||||
$response2 = Director::test('admin/subsites/Subsite/1/edit', null, $this->adminLoggedInSession());
|
||||
$response2 = Director::test("admin/subsites/Subsite/$subsite1ID/edit", null, $this->adminLoggedInSession());
|
||||
$this->assertTrue(strpos($response2->getBody(), 'id="Form_EditForm_ID"') !== false, "Testing Form_EditForm_ID exists");
|
||||
$this->assertTrue(strpos($response2->getBody(), '<head') !== false, "Testing <head> exists");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user