zend-test

Zend_Test: No default module defined for this application

ぐ巨炮叔叔 提交于 2020-01-02 06:59:26
问题 UPDATE 23 Dec I had the problem where Zend Framework complains about "No default module defined for this application". I didn't use Modules and the main app works fine. I finally solved the problem with the help from weierophinney.net Your bootstrap needs to minimally set the controller directory -- do a call to $this->frontController->addControllerDirectory(...) in your appBootstrap() method. I didn't in my example, as my Initialization plugin does that sort of thing for me. The problem is

(PHP): Testing models with Zend_Test_PHPUnit_DatabaseTestCase

雨燕双飞 提交于 2019-12-23 17:33:44
问题 When I run my PHP unit test I get: 1) Test_Model_Mapper_TestTest::testTest Argument 1 passed to PHPUnit_Extensions_Database_DataSet_DefaultTableIterator::__construct() must be an array, null given, called in /usr/share/php/PHPUnit/Extensions/Database/DataSet/AbstractXmlDataSet.php on line 134 and defined /var/www/kosheroven/library/Zend/Test/PHPUnit/Db/Operation/Truncate.php:73 /var/www/kosheroven/tests/ModelTestCase.php:79 /var/www/kosheroven/tests/application/models/mappers/TestTest.php:33

Zend_Test on Action_Helper accessing $bootstrap->getOptions() error

不想你离开。 提交于 2019-12-13 20:16:16
问题 I am accessing options from an action controller, which is working well with the application, but I've hit a problem when I attempt to UnitTest it: PHP Fatal error: Call to a member function getOptions() on a non-object in /home/zendtest/library/ZC/Action/Helper/Signup.php on line 43 For my tests I followed the setup from ZC at http://www.zendcasts.com/unit-testing-action-helpers/2010/11/ with source available here I added another test in tests/library/ZC/Action/Helper/SignupTest.php : public

Zend_Controller_Router_Exception: Route default is not defined

丶灬走出姿态 提交于 2019-12-12 10:54:05
问题 I'm trying to test a controller. Zend Tool has generated the following code: class Default_CarrinhoControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this->bootstrap = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini'); parent::setUp(); } public function testIndexAction() { $params = array('action' => 'index', 'controller' => 'Carrinho', 'module' => 'default'); $urlParams = $this->urlizeOptions($params); $url = $this->url

Setup PHPUnit with Zend Test

浪子不回头ぞ 提交于 2019-12-07 03:19:49
问题 I'm trying to start using PHPUnit with Zend Test for my Zend Framework application. I'm able to run the PHPUnit command from command line phpunit --configuration phpunit.xml . I've tried following this tutorial which is based off of Matthew Weier O'Phinney's blog post. I'm getting an error when PHPUnit tries to write the log file. Here's my phpunit.xml <phpunit bootstrap="./Bootstrap.php" colors="true"> <testsuite name="Zend Framework Tests"> <directory>./</directory> </testsuite> <!--

Setup PHPUnit with Zend Test

若如初见. 提交于 2019-12-05 07:07:52
I'm trying to start using PHPUnit with Zend Test for my Zend Framework application. I'm able to run the PHPUnit command from command line phpunit --configuration phpunit.xml . I've tried following this tutorial which is based off of Matthew Weier O'Phinney's blog post . I'm getting an error when PHPUnit tries to write the log file. Here's my phpunit.xml <phpunit bootstrap="./Bootstrap.php" colors="true"> <testsuite name="Zend Framework Tests"> <directory>./</directory> </testsuite> <!-- Optional filtering and logging settings --> <filter> <whitelist> <directory suffix=".php">../library/<