From aaf4fb4d7aeaee0760bd3d713d12b3fbea3a0d69 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 15 Oct 2020 15:12:44 +1300 Subject: [PATCH] BUG Remove broken RESOURCES_DIR test --- tests/php/Model/SiteTreeTest.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/php/Model/SiteTreeTest.php b/tests/php/Model/SiteTreeTest.php index f3b04557..9a63f842 100644 --- a/tests/php/Model/SiteTreeTest.php +++ b/tests/php/Model/SiteTreeTest.php @@ -152,23 +152,14 @@ class SiteTreeTest extends SapphireTest $this->assertEquals($urlSegment, $page->URLSegment); } - /** - * Check that explicitly setting a URL segment to the resources dir will rename it to have a -2 suffix - */ - public function testExplicitlyUsingResourcesDirForURLSegment() - { - $page = SiteTree::create(['URLSegment' => RESOURCES_DIR]); - $id = $page->write(); - $page = SiteTree::get()->byID($id); - $this->assertSame(RESOURCES_DIR . '-2', $page->URLSegment); - } - /** * For legacy resources dir values ("resources"), check that URLSegments get a -2 appended */ public function testLegacyResourcesDirValuesHaveIncrementedValueAppended() { if (RESOURCES_DIR !== 'resources') { + // This test only runs on the CMS build because it doesn't have a `resources-dir` flag on its + // composer.json file $this->markTestSkipped('This legacy test requires RESOURCES_DIR to be "resources"'); } @@ -185,6 +176,8 @@ class SiteTreeTest extends SapphireTest public function testDefaultResourcesDirHasLeadingUnderscoreRemovedAndResourcesIsUsed() { if (RESOURCES_DIR === 'resources') { + // This test won't runs on the CMS build because it doesn't have a `resources-dir` flag on its + // composer.json file. It will run on the recipe-cms build. $this->markTestSkipped('This test requires RESOURCES_DIR to be something other than "resources"'); }