From e11ca71be64a809e8f9ed35039ae6f63b9bd7d9f Mon Sep 17 00:00:00 2001 From: Andreas Piening Date: Thu, 14 Jan 2010 06:29:12 +0000 Subject: [PATCH] MINOR: Fixed subsite test that was assuming that subsite ID#s would start at 1 (false in some cases) --- tests/SubsiteAdminTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/SubsiteAdminTest.php b/tests/SubsiteAdminTest.php index bf42dc3..b734258 100644 --- a/tests/SubsiteAdminTest.php +++ b/tests/SubsiteAdminTest.php @@ -104,11 +104,12 @@ class SubsiteAdminTest extends SapphireTest { $cmsMain = new CMSMain(); foreach($cmsMain->Subsites() as $subsite) { $ids[$subsite->ID] = true; - } + } + $this->assertArrayHasKey(0, $ids, "Main site accessible"); - $this->assertArrayHasKey(1, $ids, "Site with no groups inaccesible"); - $this->assertArrayHasKey(2, $ids, "Subsite1 Template inaccessible"); - $this->assertArrayHasKey(3, $ids, "Subsite2 Template inaccessible"); + $this->assertArrayHasKey($this->idFromFixture('Subsite_Template','main'), $ids, "Site with no groups inaccesible"); + $this->assertArrayHasKey($this->idFromFixture('Subsite_Template','subsite1'), $ids, "Subsite1 Template inaccessible"); + $this->assertArrayHasKey($this->idFromFixture('Subsite_Template','subsite2'), $ids, "Subsite2 Template inaccessible"); }