From d038cd7a6594d8f7339367a94d5e3ed1b96c0573 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 15 Nov 2012 11:22:40 +1300 Subject: [PATCH] Removing deprecated tests --- tests/control/DirectorTest.php | 34 ---------------------------------- tests/model/DataObjectTest.php | 18 ------------------ 2 files changed, 52 deletions(-) diff --git a/tests/control/DirectorTest.php b/tests/control/DirectorTest.php index 102534060..4a85d482f 100644 --- a/tests/control/DirectorTest.php +++ b/tests/control/DirectorTest.php @@ -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 diff --git a/tests/model/DataObjectTest.php b/tests/model/DataObjectTest.php index 115f24f04..9839a82ab 100644 --- a/tests/model/DataObjectTest.php +++ b/tests/model/DataObjectTest.php @@ -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());