Skip to content

Commit

Permalink
Add tests for setting the default model
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez authored and markstory committed Jul 2, 2016
1 parent 271f572 commit 3305f34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/TestCase/View/Helper/PaginatorHelperTest.php
Expand Up @@ -2253,6 +2253,12 @@ public function testNoDefaultModel()
{ {
$this->Paginator->request = new Request(); $this->Paginator->request = new Request();
$this->assertNull($this->Paginator->defaultModel()); $this->assertNull($this->Paginator->defaultModel());

$this->Paginator->defaultModel('Article');
$this->assertEquals('Article', $this->Paginator->defaultModel());

$this->Paginator->options(['model' => 'Client']);
$this->assertEquals('Client', $this->Paginator->defaultModel());
} }


/** /**
Expand Down

0 comments on commit 3305f34

Please sign in to comment.