I am trying to learn how to write tests using phpunit.
In the test case i am trying to write i am testing 3 methods. Test is if method 1 returns false then call method 2 and 3 else just stop.
class ...

I have built a pretty decent dev environment on my android tablet but one of the things I'd like to accomplish is to get PHPUnit to work on it so I can run unit tests from it.
I am using Palapa Web ...

I recently worked on an application wide cache component. One implementation persists data by communicating with a Redis server, the other one uses PDO and is accessing a SQLite DB file.
There is an ...

Now I installed Composer on my system (system wide) (I'm currently on Windows).
I don't wanna use the PHPUnit instace I installed before using PEAR. I want to use the new version of PHPUnit which I ...

I'm doing the following to test a POST call to Laravel. I'm expecting that POST to questions, in accordance with my routes, will be dispatches as the store action method. This works in the browser.
...

I have read all the related questions and answers here on StackOverflow and I have also read the relevant parts in the phpunit manual, and searched the internet etcetera. I am new to unit testing and ...

I am pretty new to PHPUnit so please forgive me if this is something simple. I am using PHPUnit 3.7.38 with Laravel 4, and I am trying to test another branch of an if statement within a function by ...

What are the best practices for creating method names when writing OOP that will be mocking native PHP functions?
Example: an object needs to use file_put_contents(), and I want to mock that, so I'm ...

I need help with PHPUnit and some methods. How should you guys write tests in PHPUnit to reach a high code coverage for the following properties and methods?
I'm pretty new to PHPUnit and could need ...

I am using Symfony 2.5.4 and I am building test using PHPUnit on my Website. I was wondering if there was a way to list all the current implemented tests. I have looked in the app/console and there is ...

I need help in creating a unit test case for Laravel. It's an API end point accepting a json as the POST payload (NOT POST form) and basically just creating an entry in the database based on that json ...

I have a GITWrapper which maintains a GIT directory. For a couple of tests I need those things:
A directory with GIT
One initial commit containing no file
One commit containing a couple of new files
...

I'm trying to get XDebug to work with PHP Unit. I use PhpStorm on OSX.
Here was my approach: I took the contents of the phpunit shell script and create anew file in /usr/local/bin called php-xdebug. ...

Unfortunatelly i'm absolute zero in ZF2 and unit testing.
I wrote simple view helper(wrapper function of Zend Translate) and now i have to write a test for this. I'm trying to add one test in existing ...

I've a remote server where I host my projects. And I'm using my PhpStorm locally, so every time I save, it synchronizes automatically with the remote server.
However, I failed to configure PhpStorm ...

I currently started using the strict-Mode in PHPUnit, when I came across a Problem with the code-coverage:
If I use the setUp-method to create a new instance of a my class the __constructor-method is ...

I'm adding tests to a Symfony2 project. Previously I used the same database for dev and test environments, it used a MySQL database already populated with the same data than on the production server.
...

It may seem silly, hope not, but I want to create a service that will return mock objects for people that uses my project so they can mock all the classes from my project and test their code.
My idea ...

I'm working on a laravel project that has just over 8000 lines of code and 550 unit tests with coverage around 75%. It is taking 35 minutes to run the code coverage report, this is making integrating ...

I have some problems with my PHPUnit test, because the PHPUnit default test suite doesn't actually cover the code complexity and I kept receiving error with this PHPUnit test.
below is the controller ...