mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Fix tests to cope with ID type cleanup changed recently
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101970 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9ae7fe67a5
commit
65c711cfea
@ -106,8 +106,8 @@ class RestfulServerTest extends SapphireTest {
|
||||
$ratingsArr = $responseArr['Ratings']['RestfulServerTest_AuthorRating'];
|
||||
$this->assertEquals(count($ratingsArr), 2);
|
||||
$ratingIDs = array(
|
||||
$ratingsArr[0]['@attributes']['id'],
|
||||
$ratingsArr[1]['@attributes']['id']
|
||||
(int)$ratingsArr[0]['@attributes']['id'],
|
||||
(int)$ratingsArr[1]['@attributes']['id']
|
||||
);
|
||||
$this->assertContains($rating1->ID, $ratingIDs);
|
||||
$this->assertContains($rating2->ID, $ratingIDs);
|
||||
@ -127,8 +127,8 @@ class RestfulServerTest extends SapphireTest {
|
||||
|
||||
$this->assertEquals(count($authorsArr), 2);
|
||||
$ratingIDs = array(
|
||||
$authorsArr[0]['ID'],
|
||||
$authorsArr[1]['ID']
|
||||
(int)$authorsArr[0]['ID'],
|
||||
(int)$authorsArr[1]['ID']
|
||||
);
|
||||
$this->assertContains($author2->ID, $ratingIDs);
|
||||
$this->assertContains($author3->ID, $ratingIDs);
|
||||
|
@ -263,8 +263,7 @@ class TranslatableTest extends FunctionalTest {
|
||||
$this->assertEquals($resultPagesCustomLang->Count(), 1);
|
||||
$this->assertNotContains($origTestPage->ID, $resultPagesCustomLang->column('ID'));
|
||||
$this->assertNotContains($otherTestPage->ID, $resultPagesCustomLang->column('ID'));
|
||||
// casting as a workaround for types not properly set on duplicated dataobjects from createTranslation()
|
||||
$this->assertContains((string)$translatedPage->ID, $resultPagesCustomLang->column('ID'));
|
||||
$this->assertContains($translatedPage->ID, $resultPagesCustomLang->column('ID'));
|
||||
|
||||
Translatable::set_current_locale('en_US');
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class TranslatableSearchFormTest extends FunctionalTest {
|
||||
'Published pages in default language are not found when searching in another language'
|
||||
);
|
||||
$this->assertContains(
|
||||
(string)$translatedPublishedPage->ID,
|
||||
$translatedPublishedPage->ID,
|
||||
$results->column('ID'),
|
||||
'Published pages in another language are found when searching in this language'
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user