Top "Phpunit" questions

PHPUnit is a programmer-oriented testing framework for PHP.

PHPUnit -setUp() - does it run before and after each test case?

I am still a bit confused with setup() in PHPUnit. Does it run before and after each test case? For …

phpunit php-5.6
PHPUnit's returnValueMap not yielding expected results

I'm trying to use PHPUnit's returnValueMap() to stub out the results of a read. It isn't yielding the expected results, …

php cakephp phpunit
How can I get IDE autocomplete for PHPUnit?

I am using Symfony2, everything is installed, my tests work so good so far. I'd like to get an autocompletion …

php symfony phpunit phpstorm
Remove "Remaining deprecation notices" in Symfony 2.8

I'm new on Symfony and PHPUnit. I would like to run some tests, there are a lot of deprecation notices. …

php symfony testing phpunit
How to set up database-heavy unit tests in Symfony2 using PHPUnit?

I am quite new to the world of testing and I want to make sure I am on the right …

php symfony doctrine-orm phpunit
Symfony / Doctrine UnitTests with SQLite memory DB

I'm still working on PHP unit tests for testing my symfony2 controllers. My test classes are derivations of WebTestCase and …

doctrine-orm phpunit webtest dbal
Selenium: How to select an option from a select menu?

I am writing a Selenium test in PHP using the PHPUnit Selenium extension. I know how to type something into …

php selenium phpunit selenium-rc
Mocks vs Stubs in PHPUnit

I know stubs verify state and the mocks verify behavior. How can I make a mock in PHPUnit to verify …

unit-testing testing mocking phpunit stubs
Force Exclude files from PHPUnit Code Coverage

Is it possible to forcefully exclude a folder from PHPUnit's code coverage? Problem I've got is, that I have a …

symfony1 phpunit symfony-1.4 code-coverage
How to Run Laravel Database Seeder from PHPUnit Test setUp?

I am trying to recreate the database before each test in some PHPUnit test cases. I am using Laravel 5.3. Here …

laravel laravel-5 phpunit laravel-seeding