Permalink
Browse files

FIXED: Odd crash with error "Invalid CRT parameters detected" in test…

… cases. Replaced with equivalent non-crashing code.
  • Loading branch information...
1 parent a3b3ec8 commit ba62557aacece7d3fe6d15a19ab3e414faad2b4a @tractorcow tractorcow committed with chillu Aug 16, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/unit/TranslatableTest.php
@@ -260,7 +260,8 @@ function testDataObjectGetWithReadingLanguage() {
sprintf("\"SiteTree\".\"MenuTitle\" = '%s'", 'A Testpage')
);
$resultPagesDefaultLangIDs = $resultPagesDefaultLang->column('ID');
- array_walk($resultPagesDefaultLangIDs, 'intval');
+ foreach($resultPagesDefaultLangIDs as $key => $val)
+ $resultPagesDefaultLangIDs[$key] = intval($val);
$this->assertEquals($resultPagesDefaultLang->Count(), 2);
$this->assertContains((int)$origTestPage->ID, $resultPagesDefaultLangIDs);
$this->assertContains((int)$otherTestPage->ID, $resultPagesDefaultLangIDs);
@@ -273,7 +274,8 @@ function testDataObjectGetWithReadingLanguage() {
sprintf("\"SiteTree\".\"MenuTitle\" = '%s'", 'A Testpage')
);
$resultPagesCustomLangIDs = $resultPagesCustomLang->column('ID');
- array_walk($resultPagesCustomLangIDs, 'intval');
+ foreach($resultPagesCustomLangIDs as $key => $val)
+ $resultPagesCustomLangIDs[$key] = intval($val);
$this->assertEquals($resultPagesCustomLang->Count(), 1);
$this->assertNotContains((int)$origTestPage->ID, $resultPagesCustomLangIDs);
$this->assertNotContains((int)$otherTestPage->ID, $resultPagesCustomLangIDs);

0 comments on commit ba62557

Please sign in to comment.