I'm not getting this topic very well. I've done PHPUnit Tests before, but
right now I am unable to integrate it wih Zend_Test so I can test my MVC
environment.

My version is 3.3.1. The error only happend when the test was run from the
browser. I ran the test from the command line using the "php" binary and
nothing happens, I get no errors, nothing.

Running the same test using the "phpunit" binary I get the error "Call to
undefined method Zend_Layout::resetmvcinstance()" but it seems that this has
something to do with the registerAutoload() not working.

Should I run the test using the php binary or the phpunit? Sorry, I'm stuck
I would really appreciate your help. This my test class:

class SignupControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
{
    public $bootstrap = '/path/to/bootstrap.php';

    public function setUp()
    {
        parent::setUp();
    }


    public function testCallWithoutActionShouldPullFromIndexAction()
    {
        $this->dispatch('/signup');
        $this->assertController('signup');
        $this->assertAction('index');
    }
}

Thanks!



Matthew Weier O'Phinney-3 wrote:
> 
> -- Mauricio Cuenca <[EMAIL PROTECTED]> wrote
> (on Friday, 03 October 2008, 03:54 AM -0700):
>> Hello, I'm trying to do my first UniTests with the help of Zend_Test, but
>> there are some things that are not so clear to me.
>> 
>> I'm trying to create a simple test case, all I have is this:
>> 
>> class MyTest extends Zend_Test_PHPUnit_ControllerTestCase
>> {
>>     public $bootstrap = '/path/to/bootstrap.php';
>> 
>>     public function setUp()
>>     {
>>         parent::setUp();
>>     }
>> }
>> 
>> I get the following error:
>> 
>> "Catchable fatal error: Argument 2 passed to
>> PHPUnit_Framework_TestCase::__construct() must be an array, object given"
> 
> Odd... the above looks fine. Can you please indicate what version of
> PHPUnit you're using, and the PHP version as well?
> 
>> I also would like to know if the test should be run using the browser,
>> using the command line or both ways are equivalent.
> 
> PHPUnit is primarily geared for usage at the CLI level, though I believe
> Sebastian has capitulated and created a browser test runner. Running
> tests from the CLI is generally better, because it's more easily
> repeatable and can be integrated into continuous integration systems
> easily.
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend Framework           | http://framework.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trying-to-start-with-Zend_Test-tp19795594p19800763.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to