Permalink
Browse files

Removing deprecated tests

  • Loading branch information...
1 parent 0d79897 commit d038cd7a6594d8f7339367a94d5e3ed1b96c0573 @halkyon halkyon committed Nov 14, 2012
Showing with 0 additions and 52 deletions.
  1. +0 −34 tests/control/DirectorTest.php
  2. +0 −18 tests/model/DataObjectTest.php
@@ -191,40 +191,6 @@ public function testTestRequestCarriesGlobals() {
}
}
- 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
@@ -116,24 +116,6 @@ public function testGet() {
$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());

0 comments on commit d038cd7

Please sign in to comment.