2010年8月20日星期五

[fw-mvc] Re: Call to a member function hasPluginResource() on a non-object (phpunit)

I have something similar, but still it doesn't work:

<?php
require_once 'Zend/Application.php';
require_once 'Zend/Test/PHPUnit/ControllerTestCase.php';

abstract class ControllerTestCase extends
Zend_Test_PHPUnit_ControllerTestCase {
public $application;

public function setUp() {
$this->application = new Zend_Application ( APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini' );

$this->bootstrap = array ($this, 'appBootstrap' );
parent::setUp ();

}

public function appBootstrap() {
$this->application->bootstrap ();
}

public function tearDown() {
Zend_Controller_Front::getInstance ()->resetInstance ();
$this->resetRequest ();
$this->resetResponse ();
$this->request
->setPost ( array () );
$this->request
->setQuery ( array () );
}

}
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Call-to-a-member-function-hasPluginResource-on-a-non-object-phpunit-tp2327025p2332713.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: