Re: Testing CodeIgniter classes with PHP QA

From: Date: Wed, 26 Sep 2007 12:51:30 +0000
Subject: Re: Testing CodeIgniter classes with PHP QA
References: 1 2 3  Groups: php.qa 
Request: Send a blank email to php-qa+get-47769@lists.php.net to get a copy of this message
webcubes@developersarena.com wrote:
Hi Slattery, Thanks for replyingto my post. I am trying to test my CI application with phpt. I saw many test cases in the writing test cases section. All those give examples of simple situations. I need to test a controller/methord from a framework. Something similar to $request = new Zend_Controller_Request_Http('http://test/foo/bar'); $front->returnResponse(true); $response = $front->dispatch($request); $content = $response->getBody(); if (!strstr($content, 'foo bar')) {
       echo "Failed to retrieve expected content";
} in Zend framework. I got it from Matthew Weier O'Phinney at Zend Inc. But, we could not resolve it with CI. Can you help me to test a controller/method with phpt. Hi - I'm afraid that the short answer to that is "no". Having looked at the PHPT framework and tests you will have understood how they are used and will be in a better position that I am to understand whether using the PHPT framework is applicable in your case. There may be other people watching this list who could add to this, if so I'm sure they will reply.
Zoe
Regards, Lovegin John. http://cubettech.com ----- Original Message ----- From: "Zoe Slattery" <zoe.slattery@googlemail.com> To: <webcubes@developersarena.com>; <php-qa@lists.php.net> Sent: Wednesday, September 26, 2007 3:51 PM Subject: Re: [PHP-QA] Testing CodeIgniter classes with PHP QA
webcubes@developersarena.com wrote:
All, I am working with CodeIgniter framework and I want to use PHP QA, to test the application I develop with CI. Can anyone help me to write a test case to test it with CodeIgniter or anyotehr Framework?
Hi - Aplogies for what might seem a silly suggestion, but have you looked at this site http://qa.php.net/ and in particular the sections on how to write test cases here: http://qa.php.net/write-test.php ? If are already familiar with the pages and they don't answer your question please could you make it a bit more specific? Perhaps an example would help. Zoe Slattery


« previous php.qa (#47769) next »