Skip to content

Commit

Permalink
Unskip a bunch of PaginatorComponent tests that do not touch the data…
Browse files Browse the repository at this point in the history
…base.
  • Loading branch information
markstory committed Sep 17, 2013
1 parent 7a39b92 commit c76a59e
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php
Expand Up @@ -25,7 +25,6 @@
/**
* PaginatorTestController class
*
* @package Cake.Test.Case.Controller.Component
*/
class PaginatorTestController extends Controller {

Expand Down Expand Up @@ -53,7 +52,6 @@ class PaginatorComponentTest extends TestCase {
*/
public function setUp() {
parent::setUp();
$this->markTestIncomplete('Need to revisit once models work again.');

$this->_ns = Configure::read('App.namespace');
Configure::write('App.namespace', 'TestApp');
Expand Down Expand Up @@ -83,6 +81,7 @@ public function tearDown() {
* @return void
*/
public function testPaginate() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
$Controller->request->params['pass'] = array('1');
Expand Down Expand Up @@ -179,6 +178,7 @@ public function testPaginate() {
* @return void
*/
public function testPageParamCasting() {
$this->markTestIncomplete('Need to revisit once models work again.');
$this->Controller->Post->expects($this->at(0))
->method('hasMethod')
->with('paginate')
Expand Down Expand Up @@ -209,6 +209,7 @@ public function testPageParamCasting() {
* @return void
*/
public function testPaginateExtraParams() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);

$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
Expand Down Expand Up @@ -297,6 +298,7 @@ public function testPaginateExtraParams() {
* @return void
*/
public function testPaginateSpecialType() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
$Controller->request->params['pass'][] = '1';
Expand Down Expand Up @@ -326,6 +328,7 @@ public function testPaginateSpecialType() {
* @return void
*/
public function testDefaultPaginateParams() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->modelClass = 'PaginatorControllerPost';
$Controller->request->query = [];
Expand All @@ -345,6 +348,7 @@ public function testDefaultPaginateParams() {
* @return void
*/
public function testPaginateOrderModelDefault() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost');
$Controller->params['url'] = array();
Expand Down Expand Up @@ -389,6 +393,7 @@ public function testPaginateOrderModelDefault() {
* @return void
*/
public function testPaginateOrderVirtualField() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
$Controller->request->query = [];
Expand Down Expand Up @@ -416,6 +421,7 @@ public function testPaginateOrderVirtualField() {
* @return void
*/
public function testPaginateOrderVirtualFieldJoinedModel() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost');
$Controller->request->query = [];
Expand All @@ -439,6 +445,7 @@ public function testPaginateOrderVirtualFieldJoinedModel() {
* @expectedException Cake\Error\MissingModelException
*/
public function testPaginateMissingModel() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->constructClasses();
$Controller->Paginator->paginate('MissingModel');
Expand Down Expand Up @@ -622,6 +629,7 @@ public function testValidateSortInvalidDirection() {
* @return void
*/
public function testOutOfRangePageNumberGetsClamped() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost');
$Controller->request->query['page'] = 3000;
Expand All @@ -634,10 +642,11 @@ public function testOutOfRangePageNumberGetsClamped() {
* Test that a really REALLY large page number gets clamped to the max page size.
*
*
* @expectedException NotFoundException
* @expectedException Cake\Error\NotFoundException
* @return void
*/
public function testOutOfVeryBigPageNumberGetsClamped() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost');
$Controller->params['named'] = array(
Expand All @@ -651,10 +660,11 @@ public function testOutOfVeryBigPageNumberGetsClamped() {
/**
* testOutOfRangePageNumberAndPageCountZero
*
* @expectedException NotFoundException
* @expectedException Cake\Error\NotFoundException
* @return void
*/
public function testOutOfRangePageNumberAndPageCountZero() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new PaginatorTestController($this->request);
$Controller->uses = array('PaginatorControllerPost');
$Controller->request->query['page'] = 3000;
Expand Down Expand Up @@ -698,7 +708,7 @@ public function testValidateSortWhitelistFailure() {
* @return void
*/
public function testValidateSortWhitelistTrusted() {
$model = $this->getMock('Model');
$model = $this->getMock('Cake\Model\Model');
$model->alias = 'model';
$model->expects($this->never())->method('hasField');

Expand Down Expand Up @@ -740,9 +750,9 @@ public function testValidateSortVirtualField() {
* @return void
*/
public function testValidateSortSharedFields() {
$model = $this->getMock('Model');
$model = $this->getMock('Cake\Model\Model');
$model->alias = 'Parent';
$model->Child = $this->getMock('Model');
$model->Child = $this->getMock('Cake\Model\Model');
$model->Child->alias = 'Child';

$model->expects($this->never())
Expand Down Expand Up @@ -809,7 +819,7 @@ public function testValidateSortNoSort() {
* @return void
*/
public function testValidateSortInvalidAlias() {
$model = $this->getMock('Model');
$model = $this->getMock('Cake\Model\Model');
$model->alias = 'Model';
$model->expects($this->any())->method('hasField')->will($this->returnValue(true));

Expand Down Expand Up @@ -846,6 +856,7 @@ public function testCheckLimit() {
* @return void
*/
public function testPaginateMaxLimit() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);

$Controller->uses = array('PaginatorControllerPost', 'ControllerComment');
Expand Down Expand Up @@ -884,6 +895,7 @@ public function testPaginateMaxLimit() {
* @return void
*/
public function testPaginateOrderVirtualFieldSharedWithRealField() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
$Controller->constructClasses();
Expand Down Expand Up @@ -928,6 +940,7 @@ public function testPaginateOrderVirtualFieldSharedWithRealField() {
* @return void
*/
public function testPaginateCustomFind() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = ['PaginatorCustomPost'];

Expand Down Expand Up @@ -969,6 +982,7 @@ public function testPaginateCustomFind() {
* @return void
*/
public function testPaginateCustomFindFieldsArray() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = array('PaginatorCustomPost');
$Controller->constructClasses();
Expand Down Expand Up @@ -1001,6 +1015,7 @@ public function testPaginateCustomFindFieldsArray() {
* @return void
*/
public function testPaginateCustomFindWithCustomFindKey() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = array('PaginatorCustomPost');
$Controller->constructClasses();
Expand Down Expand Up @@ -1034,6 +1049,7 @@ public function testPaginateCustomFindWithCustomFindKey() {
* @return void
*/
public function testPaginateCustomFindGroupBy() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = array('PaginatorCustomPost');
$Controller->constructClasses();
Expand Down Expand Up @@ -1099,6 +1115,7 @@ public function testPaginateCustomFindGroupBy() {
* @return void
*/
public function testPaginateCustomFindCount() {
$this->markTestIncomplete('Need to revisit once models work again.');
$Controller = new Controller($this->request);
$Controller->uses = array('PaginatorCustomPost');
$Controller->constructClasses();
Expand Down Expand Up @@ -1140,4 +1157,5 @@ public function testPaginateCustomFindCount() {
$this->assertTrue($result['nextPage']);
$this->assertFalse($result['prevPage']);
}

}

0 comments on commit c76a59e

Please sign in to comment.