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

learn more… | top users | synonyms

0
votes
0answers
5 views

markTestSkipped() not working with sausage-based Selenium tests via Sauce Labs

I am using the sausage framework to run parallelized phpunit-based Selenium web driver tests through Sauce Labs. Everything is working well until I want to mark a test as skipped via ...
0
votes
0answers
5 views

How to test a class that depends on an external collection in PHPUnit?

One of my classes, Foo, has a method, Foo::bar(), that relies on an injected collection, BazCollection, and values extracted from that collection's items. I need to unit test Foo::bar(), and I can't ...
0
votes
0answers
4 views

cake php unit connection reset

In a project with HABTM (Has And Belongs To Many) connected through a join table that is also a model. I am trying to delete an instance of the model. The delete works fine within the app. However ...
0
votes
1answer
11 views

Symfony 2 Functional Testing external URL

Whatever I do, I always get a Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for [...]" in $crawler->text(), when I try to request an external URL with ...
0
votes
0answers
9 views

Symfony2 : Functionnal testing in Request Scope using a Service depending on a Request Listener Service

I'm new with services and phpUnit. So I'm trying to test my (working) services. Here is my services.yml : services: history_cookie: class: ...
0
votes
0answers
10 views

PHPUnit_Framework_Exception

I am programming some tests with PHPUnit and recently, I have come across the flag option: --process-isolation After reading that it runs each test in a separate PHP process, I thought it might be ...
0
votes
0answers
8 views

How can I create test-suites to run on VisualPHPUnit?

I am using VisualPHPUnit and I am trying to organize my tests into suites (due to the fact that Selenium IDE does not export PHPUnit test suites). I am currently implementing the option of the ...
1
vote
0answers
15 views

PHPUNIT Selenium 2 key “enter” submit wrong form in Firefox 22

Until now my testcase working fine on FF21 but after i updated to FF22 when im using "enter" button he submit all form instead of this element which is on focus. There is part of my "code" ...
0
votes
1answer
30 views

Why is symfony2 functional test client->request() not getting successful response()?

So I've decided to delve into phpunit testing and I've shamefully written out my php code before writing my test. Anyway, I'm just writing a very simple test that tells me if I actually found the ...
0
votes
1answer
15 views

Error trying to select a form from symfony2 crawler?

I keep getting the following error: There was 1 error: 1) Caremonk\MainSiteBundle\Tests\Controller\SecurityControllerFunctionalTest::testIndex InvalidArgumentException: The current node list is ...
0
votes
0answers
13 views

Error PHPUnit with PDO and @runInSeparateProcess

I'm trying to execute a simple PHPUnit test using the "@runInSeparateProcess" annotation and a PDO connection, but it raise the following exception : PHPUnit_Framework_Exception: PHP Fatal ...
0
votes
0answers
27 views

building and testing a new ZF2 application

I've been following ZF2 tutorials on where/how to write unit tests for modules while I'm writing an application. Right now each module has its own test dir with its own Bootstrap.php and phpunit.xml ...
0
votes
1answer
22 views

Issue with cakePHP running unit tests

I've have the weirdest issue while trying to test something in my cakePHP 2.0 app. I have a function inside a model that queries the database to check if the app has already sent a notification in the ...
0
votes
0answers
14 views

How to use PHPUnit administrative connection to query DB?

Using the PHPUnit administrative connection to the database would avoid "polluting" any logging or other things going on inside of our app code with an SQL command that's only being used to implement ...
0
votes
1answer
15 views

phpunit method getNumAssertions returns 0

i'm using PHPUNIT 3.4.5, and i would like to get the total number of assertions done by my tests (3 assertions for my sample code). The method "getNumAssertions" keeps returning 0. public ...

1 2 3 4 5 164
15 30 50 per page