Skip to content

Commit

Permalink
Fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Sep 22, 2014
1 parent 732556f commit 0c2f466
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Datasource/QueryTrait.php
Expand Up @@ -414,7 +414,7 @@ protected function _decorateResults($result) {
}

if ($this->bufferResults()) {
$result = $result->buffered();
$result = new $decorator($result->buffered());
}

return $result;
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -660,10 +660,10 @@ public function testPaginate() {
$this->assertArrayNotHasKey('Paginator', $Controller->helpers);

$results = $Controller->paginate('Posts');
$this->assertInstanceOf('Cake\ORM\ResultSet', $results);
$this->assertInstanceOf('Cake\Datasource\ResultSetDecorator', $results);

$results = $Controller->paginate(TableRegistry::get('Posts'));
$this->assertInstanceOf('Cake\ORM\ResultSet', $results);
$this->assertInstanceOf('Cake\Datasource\ResultSetDecorator', $results);

$this->assertSame($Controller->request->params['paging']['Posts']['page'], 1);
$this->assertSame($Controller->request->params['paging']['Posts']['pageCount'], 1);
Expand All @@ -686,7 +686,7 @@ public function testPaginateUsesModelClass() {
$Controller->modelClass = 'Posts';
$results = $Controller->paginate();

$this->assertInstanceOf('Cake\ORM\ResultSet', $results);
$this->assertInstanceOf('Cake\Datasource\ResultSetDecorator', $results);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/QueryTest.php
Expand Up @@ -1537,7 +1537,7 @@ public function testCacheWriteIntegration() {
->method('write')
->with(
'my_key',
$this->isInstanceOf('Cake\ORM\ResultSet')
$this->isInstanceOf('Cake\Datasource\ResultSetDecorator')
);

$query->cache('my_key', $cacher)
Expand Down

0 comments on commit 0c2f466

Please sign in to comment.