Note that there are some explanatory texts on larger screens.

plurals
  1. POLoading Zend-Framework Model in Phpunit Class
    primarykey
    data
    text
    <p>I want to call my zend-framework model and use there functions in <code>AuthenticationControllerTest.php</code> but I am getting error when i run it from terminal.</p> <pre><code> - -MyZendproject - -application -model -testmodel - +public - -tests - aplication - controller - .AuthenticationControllerTest.php </code></pre> <p>Here is my <code>AuthenticationControllerTest.php</code> file</p> <pre><code>&lt;?php require_once `PHPUnit/Framework/TestCase.php`; defined(`APPLICATION_PATH`) || define(`APPLICATION_PATH`, realpath(dirname(__FILE__) . `/../application`)); // Define application environment defined(`APPLICATION_ENV`) || define(`APPLICATION_ENV`, `tests`); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . `../../../library`), get_include_path()))); // Zend_Application require_once `Zend/Application.php`; $application = new Zend_Application( APPLICATION_ENV, realpath(APPLICATION_PATH .`configs/application.ini`) ); class AuthenticationControllerTest extends PHPUnit_Framework_TestCase { public function testLoginRetriespLogin() { $testmodel = new Model_testmodel_Object();//my model } } </code></pre> <p>but when run it from terminal "phpunit AuthenticationControllerTest" it give me error:</p> <blockquote> <p>$ phpunit AuthenticationControllerTest </p> <p>..FPHP Fatal error: Class 'Model_testmodel_Object' not found in /var/www/versioned/pm160form/tests/application/controllers/AuthenticationControllerTest.php on line 146</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload