mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4954 from tractorcow/pulls/3.3/version-fixes
BUG Fix VersionedTest sometimes failing given certain querystring arguments
This commit is contained in:
commit
e9d45b4d5f
@ -639,6 +639,8 @@ class VersionedTest extends SapphireTest {
|
|||||||
$this->assertArrayNotHasKey('readingMode', $session2->inst_changedData());
|
$this->assertArrayNotHasKey('readingMode', $session2->inst_changedData());
|
||||||
|
|
||||||
// Test choose_site_stage
|
// Test choose_site_stage
|
||||||
|
unset($_GET['stage']);
|
||||||
|
unset($_GET['archiveDate']);
|
||||||
Session::set('readingMode', 'Stage.Stage');
|
Session::set('readingMode', 'Stage.Stage');
|
||||||
Versioned::choose_site_stage();
|
Versioned::choose_site_stage();
|
||||||
$this->assertEquals('Stage.Stage', Versioned::get_reading_mode());
|
$this->assertEquals('Stage.Stage', Versioned::get_reading_mode());
|
||||||
@ -662,8 +664,8 @@ class VersionedTest extends SapphireTest {
|
|||||||
/**
|
/**
|
||||||
* Ensures that the latest version of a record is the expected value
|
* Ensures that the latest version of a record is the expected value
|
||||||
*
|
*
|
||||||
* @param type $record
|
* @param DataObject $record
|
||||||
* @param type $version
|
* @param int $version
|
||||||
*/
|
*/
|
||||||
protected function assertRecordHasLatestVersion($record, $version) {
|
protected function assertRecordHasLatestVersion($record, $version) {
|
||||||
foreach(ClassInfo::ancestry(get_class($record), true) as $table) {
|
foreach(ClassInfo::ancestry(get_class($record), true) as $table) {
|
||||||
|
Loading…
Reference in New Issue
Block a user