So I've set up testing in my ZF 1.9.5 application thanks to this tutorial, I am able to test my controllers, now I want to create a test for a form. However, I'm having the problem that PHPUnit can't find my form.
Fatal error: Class 'Default_Form_AccountProfile' not found
I'm extending PHPUnit_Framework_TestCase instead of Zend_Test_...
For example:
How can I assert this input?
$this->assertQuery( "input[name="user_name][type='hidden']") can not find any content.
Of couse $this->assertQuery( "input[name='user_name']) will work well, but I need to use type and name attributes together.
Thanks a lot.
...
How do I begin testing my models in a Zend Framework 1.8+ application?
Let's say I have my application set up to start testing. I have already tested a controller, so I know it works. I have all my controllers extending my ControllerTestCase.php file:
<?php
require_once 'Zend/Application.php';
require_once 'Zend/Test/PHPUnit/Controller...
Hi,
What is the best way to verify that a link with a specific url and content exists on a tested page? I'm using Zend_Test and the following simplified example works fine until there is a dot (".") in the url, which obviously can happen very often...
This is OK:
$this->assertQueryContentContains('a[href="/index"]', 'Home');
Now if...
I'm using the zend modular director structure, i.e.
application
modules
users
controllers
.
.
lessons
reports
blog
I have a unit test for a controller in 'blog' that goes something like the below section of code:
I'm definitely doing somet...
Hi,
I beginer programmer,and don't have any QA experience
(only simple test that i write without PHPUnit or other tool)
How I can create test for testing multi users sessions in the same time?
(PHPUnit+ZendFramework)
basic tests examples that I thinking to do (I am not QA - I soory if i wrong):
users logins in the same time
use...
The error I'm getting is below.
Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory
I've tried setting the xampp php to be the php in my PATH, hoping that it's a configuration file, but I had no luck with that. I'm not really sure why else it would say no such file or directory. Does anyone have any ideas?
Up...
Hi there,
I asked the same question in another forum, but I don't yet have any luck there. So please allow me to ask the same question here.
I want to setup Zend_Test to test my controller code (I am using PHP, Zend Framework). Everything seems to be correct and according to the official documentation, but I kept getting an error.
For...
in the docs the provided code for bootstrapping looks like
protected $application;
public function setUp() {
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}
public function appBootstrap() {
$this->application = new Zend_Application( ... );
$this->application->bootstrap();
}
i was curious why when i...
Hi
I have some issues with code coverage reports in PHPunit and the zend framework. Whenever I run a phpunit test the code coverage fails returning the following message:
PHPUnit 3.4.15 by Sebastian Bergmann.
I.......III.I................................IIIIIIIIIIIIIII 60 / 93
IIII....I....I..II..II.....IIIIII
Time: 4 seconds, Memo...
I wanted to write unit tests for my Zend Framework/Doctrine 2.0 application, but I don't quite understand how to set up unit testing in ZF. Also, I would like to include Doctrine 2.0 in those unit tests. How would I go about setting this up? Can you point me to an example?
Thank You
...