Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 /**
  * @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());
 }