BUGFIX: fixed broken test in subsites module that relies on specific numeric IDs

This commit is contained in:
Julian Seidenberg 2010-08-03 22:41:10 +00:00
parent 1e58cca92c
commit d77e9c9415
1 changed files with 3 additions and 1 deletions

View File

@ -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");
}