Exemple #1
0
 /**
  * @dataProvider afterCanEmailToFriendDataSet
  * @param bool $result
  * @param string $callSendfriend
  */
 public function testAfterCanEmailToFriend($result, $callSendfriend)
 {
     $this->sendfriendModel->expects($this->{$callSendfriend}())->method('canEmailToFriend')->will($this->returnValue(true));
     $this->assertTrue($this->view->afterCanEmailToFriend($this->productView, $result));
 }
 /**
  * @param bool $isExceedLimit
  * @param bool $result
  *
  * @dataProvider dataProviderCanSend
  */
 public function testCanSend($isExceedLimit, $result)
 {
     $this->sendfriendMock->expects($this->once())->method('isExceedLimit')->willReturn($isExceedLimit);
     $this->assertEquals($result, $this->model->canSend());
 }