public function testMagicCallProxiesToEntityManager() { $entityManager = new Waf_Zend_Controller_Action_Helper_EntityManagerTest_TestEntityManager(); $model = new Waf_Model(); $model->register(); $model->setEntityManager($entityManager); $this->assertEquals('sapperdedosiofoo', $this->entityManagerHelper->test('foo')); }
public function testMagicCallProxiesToRepositoryMethod() { $model = new Waf_Model(); $model->register(); $model->setEntityManager(new Waf_Zend_Controller_Action_Helper_RepositoryTest_TestEntityManager()); $request = new Zend_Controller_Request_Simple(); $request->setControllerName('test'); $request->setModuleName('default'); Zend_Controller_Front::getInstance()->setRequest($request); $this->assertType('Waf_Zend_Controller_Action_Helper_RepositoryTest_TestRepository', $this->repositoryHelper->testMagicCall()); }