You searched for phpunit

  1. Error Condition Testing with PHPUnit

    Let’s say you’re maintaining code that uses PHP’s native trigger_error() function to log error information. Let’s also say that you’re in the process of using PHPUnit to write unit tests for that code. If you refer to the PHPUnit manual, there's a section that deals with testing for error
  2. Getting Started with PHPUnit

    of unit testing with PHPUnit and how easy it is to get started using it as I guide you trough the process of writing your first test. Before you can start writing your first unit test, you need to have PHPUnit installed. It can easily be installed using the PEAR installer, and the process
  3. PHPMaster: Getting Started with PHPUnit

    ? This is where unit testing comes in, to automate the testing process. Unit testing makes it easier, and above all safer, to modify your code because it catches any irregularities in the behavior (i.e More: PHPMaster: Getting Started with PHPUnit
  4. Advanced PHPUnit Testing: Annotations and Mocking

    In the first two parts of this series (Introduction to Unit Testing in PHP with PHPUnit and Getting to Know PHPUnit’s Assertions), I’ve walked you through some of the steps you can take to test your application. I showed you how, with the help of PHPUnit, you can write tests that are as simple
  5. Tutorial: Introduction to Unit Testing in PHP with PHPUnit

    get to the good part—a practical example that you can sink your teeth into. For the sake of my examples, I'm only going to use one of the more popular unit-testing tools out there, PHPUnit. This amazing application was developed by Sebastian Bergmann, and it provides an excellent set of features
  6. PhpStorm 8 - New Features

    components in the IDE RequireJS aliases support CucumberJS and Less 1.6 support Live templates are now suggested in code completion Code blocks automatically indent after closing a curly brace Find the rest here or on the original EAP post. PhpUnit 4.0 Support Two weeks later, EAP 136.1255
  7. Unit Testing with GuzzlePHP

    ": { "php": ">=5.3.3", } "require-dev": { "phpunit/phpunit": "4.0.*", "guzzle/guzzle": "~3.7" } } I’ve stipulated a minimum PHP version of 5.3.3. To be fair, it likely should be higher, but this is a good start. Our only other requirements are PHPUnit and Guzzle
  8. 8 Must Have PHP Quality Assurance Tools

    and advice about them - however, we’re open to expanding this list with other QA tools you throw our way that get plenty of votes in the comments below or seem interesting and/or useful enough. 1. PHPUnit Mr. Bergmann’s own PHPUnit is, unsurprisingly, present on the list. PHPUnit is the most
  9. Mock your Test Dependencies with Mockery

    the tests, then build the final objects. A mock object is generally faster than preparing a whole database for your test. When running unit tests, you are probably using PHPUnit. PHPUnit comes with some default mocking abilities as you can see in the documentation. You can read more about mocking