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. 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
  8. 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
  9. Re-introducing FuelPHP

    . Refine: Run tasks such as migrate, and also your own customized tasks. Package: Install, update and remove packages. Console: Test your code in real-time using an interactive shell. Testing: Run PHPUnit tests. Read more about oil here. FuelPHP Packages Fuel has packages which allow
  10. The Forum PHP Report

    of such caliber - we’re used to expecting more from our, well, heroes. Still, the talk was informative when it wanted to be that and I did learn new things - if not about the pattern, then about the man and the process behind PHPUnit. Jordi Bogianno’s talk was a shovel to the face - I went in expecting
  11. Interactive PHP Debugging with PsySH

    pattern. The UML class diagram of such a pattern is as follows: Do not worry if you do not know much about UML or design patterns, understanding them is not required for this article. Also for this project, I created a set of test cases. Those test cases can be run by phpUnit. Again, you do
  12. 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
  13. PhpStorm 8 Released - See What's New and Grab a Free License

    . New Features in PhpStorm 8 Apart from the previously covered support for Drupal 8, multiple cursors, PHPUnit 4, remote interpreters, Markdown in PHPDoc, PSR4 inspections, ability to open remote URLs from the files referencing them and, of course, Behat support, several new improvements were made
  14. 18 Critical Oversights in Web Development

    specifically constructed to work with PHP projects. If you find this too overwhelming, then at least write unit tests for your application using PHPUnit, Behat or PHPSpec. It may seem a lot of work at first, but it’s proven countless times that tests are helping projects in the long run
  15. PHPSummerCamp Review

    first ever talk was better than expected for a rookie, and he covered PHPSpec well. His workshop introduced the audience to the mystical world of auto-mocking and code generation with PHPSpec - a specification testing tool that can either be used as a replacement for, or complement to PHPUnit
  16. Check Your Code's Quality with SensioLabs Insight

    and PHPUnit, for example. Although SensioLabs Insight has some similar checks, it also does much more. Do note, however, that SensioLabs Insight does not run on your local environment, but rather as a service by SensioLabs. As of this writing, it has 99 checkpoints it scans for. It scans
  17. When WordPress Meets Vagrant: VVV

    5.5.x php-fpm 5.5.x memcached 1.4.13 PHP memcache extension 3.0.8 PHP xdebug extension 2.2.5 PHP imagick extension 3.1.2 PHPUnit 4.0.x ack-grep 2.04 git 1.9.x subversion 1.8.x ngrep dos2unix Composer phpMemcachedAdmin phpMyAdmin 4.1.14 (multi-language) Opcache Status Webgrind NodeJs
  18. Continuous Integration with PHP-CI

    part for me was the fact that I received messages like Plugin Status: Success and Plugin Status: Failed in my console and the build was giving me an empty table. I believed it meant that it somehow failed to run a tool like PHPUnit. Yet it tells you if PHPUnit actually succeeded or failed
  19. Symfony in Drupal 8

    further on Guzzle, we recommend reading our previous article on it. PHPUnit – Used in Drupal 8 to standardize unit testing throughout the core as well as help developers write code that is of utmost quality. PHPUnit ensures that any code written in Drupal 8 and in any custom module incorporated
  20. Autogenerate CRUD Apps with Phreeze

    view in a later stage. Another type of package is called the test package. If supports PHPUnit and QUnit. We will not cover this in this article. Application Name and Root URL For application name, just give it a meaningful one of your choice. We need to be careful when setting