PHPUnit is the de facto standard for writing unit tests for PHP code.
1
vote
0answers
25 views
TDD Best Practice In Using Restful Api in Yii application
I'm constantly looking for the best way to use TDD in Yii app development. Nowday most web app are composed by a fronted, an API layer (usually JSON) to provide async calls to the server and a ...
0
votes
2answers
18 views
php-webdriver: wait for browser response after submitting form using click()
Aside from using sleep() in my test, I'm wondering if anyone knows of a better strategy to explicitly wait for a form submission (POST) to complete before continuing with my assertions. Here's a very ...
0
votes
0answers
17 views
PHPUnit Code Coverage Filter Ignored in Sonar?
I am using Sonar to view reports about our PHP project. It has worked out great so far but I have run into a snag. The code coverage seems to ignore filtered files.
My Ant configuration takes all ...
0
votes
0answers
10 views
Netbeans generating test files without directory tree
I've got a Symfony2 project opened in Netbeans 7.2 with PHPUnit 3.6.12. I've got specified the tests folder. The problem is when specify the skeleton generator script (tools->options->php->unit ...
0
votes
1answer
23 views
PHPUnit Selenium with the Grinder and GWT
I've setup a Selenium test case using the PHPUnit extension for Selenium.
I've executed the test case and it works perfectly.
Now I'd like to do some performance tests with The Grinder.
In other ...
2
votes
3answers
39 views
Symfony 2: how to properly test Doctrine models?
Is there a way to properly unit test Doctrine models in a Symfony 2 application? Right now i'm writing functional tests that go through the controller in order to make sure my application is storing ...
4
votes
2answers
50 views
mb_convert_encoding() not working with phpunit
For some reason, when running mb_convert_encoding in phpunit, I am getting unexpected results. For example doing the following:
var_dump( mb_convert_encoding( utf8_decode( 'ö' ), 'UTF-8' ) === 'ö' )
...
1
vote
1answer
33 views
PHPUnit, Fatal error: Class 'mysqli' not found
I have a similar to issue to that described here:
Everything works as I would expect; my code accesses the Database and prints output irrespective of whether I run in from my command line interface ...
1
vote
1answer
27 views
PHPUnit data provider error
So I just started using PHPUnit and I'm writing tests for a very simple library. It only consists of two classes so I figured it would be great place to start so I can get the hang of how Unit Testing ...
1
vote
2answers
18 views
Suggestions to avoid DB deps when using an in-memory sqlite DB to speed up unit tests
I've been using sqlite::memory: for unit tests: it is quick, and makes test clean-up automatic. But I'm concerned my tests could be missing bugs due to SQL server assumptions. (This particular code is ...
2
votes
4answers
26 views
require_once not working as I expect it to [duplicate]
Possible Duplicate:
relative path in require_once doesn’t work
I have a project structure as such:
ProjectName/
src
test
TestClass.php
tests
TestTestClass.php
...
-1
votes
0answers
21 views
pear installation currupted? [closed]
I tried to install PHPUnit with pear like it is described here but my computer crashed during the installation. Since then I think my installation of pear is is corrupt. When I try to run
pear ...
1
vote
2answers
51 views
Testing Controllers in Symfony2 with Doctrine
I have created a very simple REST controller in Symony2 with Database insert/updates/deletes in the controller actions.
Is there a nice way to write unit/integration tests for these controller ...
0
votes
1answer
62 views
+50
xdebug, phpunit, and vim. 'uninitialized' variables in context
I am using this vim plugin https://github.com/ludovicPelle/vim-xdebug with xdebug
Xdebug and the vim plugin are working fine with regular scripts. I can step through and print out variables.
When I ...
-2
votes
2answers
49 views
How to test php with out a framework like zend [closed]
I am use to working with frameworks like zend or rails and using various testing methodologies. How ever, I cannot fathom how to test a regular, non framework based class in php that has the following ...