Last active
December 20, 2015 08:09
-
-
Save andriesss/6098151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$model = new SomeModel(); | |
$model->setName('test'); | |
$someService = $this->getMock('\My\Service\Some'); | |
$someService | |
->expects($this->any()) | |
->method('getAll') | |
->will($this->returnValue(array($model))); | |
$form = $this->getMock('\My\Form\Camera'); // extends Zend_Form which inits a bunch of form elements | |
$form | |
->expects($this->any()) | |
->method('getSomeService') | |
->will($this->returnValue($someService)); | |
var_dump($form->getElements()); // --> NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment