Removing deprecated tests

This commit is contained in:
Sean Harvey 2012-11-15 11:22:40 +13:00
parent 0d79897d4f
commit d038cd7a65
2 changed files with 0 additions and 52 deletions

View File

@ -191,40 +191,6 @@ class DirectorTest extends SapphireTest {
}
}
public function testURLParam() {
// 2.4 only
$originalDeprecation = Deprecation::dump_settings();
Deprecation::notification_version('2.4');
Director::test('DirectorTestRule/myaction/myid/myotherid');
// TODO Works on the assumption that urlParam() is not unset after a test run, which is dodgy
$this->assertEquals(Director::urlParam('Action'), 'myaction');
$this->assertEquals(Director::urlParam('ID'), 'myid');
$this->assertEquals(Director::urlParam('OtherID'), 'myotherid');
Deprecation::restore_settings($originalDeprecation);
}
public function testURLParams() {
// 2.4 only
$originalDeprecation = Deprecation::dump_settings();
Deprecation::notification_version('2.4');
Director::test('DirectorTestRule/myaction/myid/myotherid');
// TODO Works on the assumption that urlParam() is not unset after a test run, which is dodgy
$this->assertEquals(
Director::urlParams(),
array(
'Controller' => 'DirectorTestRequest_Controller',
'Action' => 'myaction',
'ID' => 'myid',
'OtherID' => 'myotherid'
)
);
Deprecation::restore_settings($originalDeprecation);
}
/**
* Tests that additional parameters specified in the routing table are
* saved in the request

View File

@ -116,24 +116,6 @@ class DataObjectTest extends SapphireTest {
$this->assertEquals(3, $comments->Count());
$this->assertEquals('Phil', $comments->First()->Name);
// Test join - 2.4 only
$originalDeprecation = Deprecation::dump_settings();
Deprecation::notification_version('2.4');
$comments = DataObject::get(
'DataObjectTest_TeamComment',
"\"DataObjectTest_Team\".\"Title\" = 'Team 1'",
"\"Name\" ASC",
"INNER JOIN \"DataObjectTest_Team\""
. " ON \"DataObjectTest_TeamComment\".\"TeamID\" = \"DataObjectTest_Team\".\"ID\""
);
$this->assertEquals(2, $comments->Count());
$this->assertEquals('Bob', $comments->First()->Name);
$this->assertEquals('Joe', $comments->Last()->Name);
Deprecation::restore_settings($originalDeprecation);
// Test limit
$comments = DataObject::get('DataObjectTest_TeamComment', '', "\"Name\" ASC", '', '1,2');
$this->assertEquals(2, $comments->Count());