Skip to content
Browse files

MINOR: Fix test to rely less on known test data keys (breaks SQLite)

  • Loading branch information...
1 parent 694e770 commit f670576cad26fc0387870056ee3873d30b399a33 @sminnee sminnee committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/forms/gridfield/GridFieldDetailFormTest.php
View
4 tests/forms/gridfield/GridFieldDetailFormTest.php
@@ -108,7 +108,7 @@ function testNestedEditForm() {
$parser = new CSSContentParser($response->getBody());
$personEditLink = $parser->getByXpath('//fieldset[@id="Form_ItemEditForm_People"]//tr[contains(@class, "ss-gridfield-item") and contains(@data-id, "' . $person->ID . '")]//a');
$this->assertEquals(
- 'GridFieldDetailFormTest_GroupController/Form/field/testfield/item/1/ItemEditForm/field/People/item/1/edit',
+ 'GridFieldDetailFormTest_GroupController/Form/field/testfield/item/1/ItemEditForm/field/People/item/' . $person->ID . '/edit',
(string)$personEditLink[0]['href']
);
@@ -120,7 +120,7 @@ function testNestedEditForm() {
// Get fourth level form (Category detail view)
$this->assertEquals(
- 'GridFieldDetailFormTest_GroupController/Form/field/testfield/item/1/ItemEditForm/field/People/item/1/ItemEditForm/field/Categories/item/1/edit',
+ 'GridFieldDetailFormTest_GroupController/Form/field/testfield/item/1/ItemEditForm/field/People/item/' . $person->ID . '/ItemEditForm/field/Categories/item/1/edit',
(string)$categoryEditLink[0]['href']
);
}

1 comment on commit f670576

@chillu
SilverStripe Ltd. member

@sminnee I've fixed this for the other assertions as well in 73efe85, sorry! The one you fixed should've actually been $category->ID, but didn't fail because they're all ID=1 usually.

Please sign in to comment.
Something went wrong with that request. Please try again.