Skip to content

Instantly share code, notes, and snippets.

@tareko
Created September 29, 2015 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tareko/9d6c02259e0cfd540758 to your computer and use it in GitHub Desktop.
Save tareko/9d6c02259e0cfd540758 to your computer and use it in GitHub Desktop.
Failure of helper mock
public function testIcsViewId() {
$Shifts = $this->generate('Shifts', array(
'methods' => array(
'iCal'
)
));
App::uses('View', 'View');
App::uses('iCalHelper', 'View/Helper');
$View = new View();
$Shifts->iCal = new iCalHelper($View);
$Shifts->iCal->expects($this->once())
->method('render')
->will($this->returnValue(true));
$result = $this->testAction('/shifts/icsView/id:1');
// debug($result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment