Skip to content

Commit

Permalink
add functional test to noderepository
Browse files Browse the repository at this point in the history
  • Loading branch information
veolys-nanne committed Jul 26, 2016
1 parent 95605fa commit bec9d30
Showing 1 changed file with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,31 @@ public function testFindLastVersionByTypeCurrentlyPublished($siteId, $expectedCo
public function provideFindLastVersionByTypeCurrentlyPublished()
{
return array(
array("1", 1),
array("2", 1),
array("1", 0),
array("2", 5),
);
}

/**
* @param string $nodeId
* @param string $language
*
* @dataProvider provideFindByPathCurrentlyPublished
*/
public function testFindByPathCurrentlyPublished($path, $siteId, $expectedCount)
{
$this->assertCount($expectedCount, $this->repository->findByPathCurrentlyPublished($path, $siteId));
}


/**
* @return array
*/
public function provideFindByPathCurrentlyPublished()
{
return array(
array("root", "2", 7),
array("transverse", "2", 0),
);
}
}

0 comments on commit bec9d30

Please sign in to comment.