Skip to content

Commit

Permalink
Adding some doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 22, 2014
1 parent 94fef9f commit 190f10f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/TestCase/ORM/AssociationTest.php
Expand Up @@ -205,12 +205,22 @@ public function testInvalidStrategy() {
$this->assertEquals('subquery', $this->association->strategy());
}

/**
* Tests test finder() method as getter and setter
*
* @return void
*/
public function testFinderMethod() {
$this->assertEquals('all', $this->association->finder());
$this->assertEquals('published', $this->association->finder('published'));
$this->assertEquals('published', $this->association->finder());
}

/**
* Tests that `finder` is a valid option for the association constructor
*
* @return void
*/
public function testFinderInConstructor() {
$config = [
'className' => '\Cake\Test\TestCase\ORM\TestTable',
Expand All @@ -232,6 +242,12 @@ public function testFinderInConstructor() {
$this->assertEquals('published', $assoc->finder());
}

/**
* Tests that the defined custom finder is used when calling find
* in the association
*
* @return void
*/
public function testCustomFinderIsUsed() {
$this->association->finder('published');
$this->assertEquals(
Expand Down

0 comments on commit 190f10f

Please sign in to comment.