Exemplo n.º 1
0
 /**
  * Ensure the board correctly calculates the page for the latest post in it
  * 
  * @param int $replies
  * @param int $perPage
  * @param int $expected
  * @dataProvider providerCalcLastPostPage
  */
 public function testCalcLastPostPage($replies, $perPage, $expected)
 {
     $this->board->set('last_post_replies', $replies);
     $this->modx->setOption('discuss.post_per_page', $perPage);
     $page = $this->board->calcLastPostPage();
     $this->assertEquals($expected, $page);
 }