PHPUnit is the de facto standard for writing unit tests for PHP code.

learn more… | top users | synonyms

0
votes
1answer
28 views

How should I test this method?

I've been trying to adopt TDD methodologies in my projects lately but I have a hard time knowing how to test certain pieces of code. I've read quite a bit on the subject but I have a hard time taking ...
0
votes
1answer
12 views

CakePHP - PHPUNIT - Tables getting deleted when we run test.php

I'm a newbie to PHPUnit testing. I have successfully installed PHPUnit and I am able to run it. I have a new database with some records. Whenever I run the test cases, the tables are getting deleted ...
0
votes
1answer
16 views

Global variabels in phpunit_Selenium2

I have a array with names I use to generate random names in a form and I want to use it in more then one function. class TestMyTest extends PHPUnit_Extensions_Selenium2TestCase { public function ...
0
votes
0answers
10 views

how to set phpunit logging via ant

is there a best practice switching the phpunit logging on/off in the phpunit.xml via ant? Atm I use two different phpunit.xml files (one for local tests without logging the other with logging enabled ...
0
votes
1answer
27 views

no assertions phpunit but there is

I have a testcase for phpunit, but when it runs its reports there are no assertions. There are clearly assertions. it looks no different to my other files. the number of tests reported is accurate if ...
1
vote
1answer
29 views

Why pear and phpunit is not installed in xampp on ubuntu? [closed]

I have installed xampp 1.8 on my ubuntu 12.04. In /opt/lampp/lib/php/PEAR I can see there are two directory named PEAR and PHPUnit. But when I run pear -V or phpunit from terminal it gives the below ...
0
votes
0answers
13 views

Selenium + phpunit, Screenshots in Chrome and InternerExplorer Failure

I have a test in phpunit that uses Selenium and take screenshots on failed tests and in key points. It work on Firefox but not in Chrome and Internet explorer(remote win7 machine). The code to take ...
2
votes
1answer
23 views

phpunit --debug still displays only dots

I want to see which test is currently executed during a phpunit run. I use the --debug param but still only get dots: $ phpunit --debug PHPUnit 3.7.19 by Sebastian Bergmann. Configuration read ...
0
votes
0answers
25 views

unit test in zend

I followed the unit test tutorial for Zend :- http://framework.zend.com/manual/2.1/en/tutorials/unittesting.html but I don't understand how to apply it my project. I'am not able to figure out if my ...
0
votes
0answers
14 views

PHPUnit with Selenium2 - share session not working

I'm doing some tests with PHPUnit and Selenium and i would like all of them to run in the same browser window. I've tried starting the Selenium Server with java -jar ...
0
votes
1answer
27 views

how to validate a form using phpunit test?

In below code a feedback form takes input for 3 fields like name, email id & comments. So validation needs to be tested using phpunit test. please help on this. I am new to php syntax altogether. ...
0
votes
1answer
17 views

phpUnit - Functions in test class that aren't tests

I'm doing some speed comparisons between reports in phpunit, as I am trying to figure out an optimization problem. I have a couple of functions that aren't necessarily tests, but don't belong in the ...
0
votes
0answers
22 views

PHPUnit and VIM

I'm trying to run phpunit tests in VIM. Because I didn't found any useful plugins I decide to put a simple line in my .vimrc autocmd FileType php noremap <Leader>x :w!<CR>:!phpunit ...
0
votes
0answers
13 views

Braintree library requires open_ssl extension when test with phpunit

I am working Testcase in phpunit for payment library of braintree it gives Braintree library requires open_ssl extension when test with phpunit
0
votes
0answers
13 views

Using PHPUnit with CakePHP on IIS 7 over Windows

I am having troubles trying to make PHPUnit work over IIS 7 and Windows 7. I am getting this error when trying to test if it works accessing to http://localhost/your_app/test.php as pointed in the ...

1 2 3 4 5 157
15 30 50 per page