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. Preparing and Building a PHP Project in Jenkins

    to overcome some hurdles. We will be using a fork of Jumph as our basis. First and foremost, we have to make sure that we have tools like PHPUnit and PHP-CodeSniffer available. We can do this in two different ways. Either we install the packages on our Jenkins server through Pear or Composer globally
  8. Analyzing a PHP Project with Jenkins

    in which you can find this information. Below, you will see a screenshot of the plot which indicates the total lines of code and comments and the total amount of methods, classes, traits and functions. PHPUnit A big amount of statistics within Jenkins is generated by PHPUnit
  9. Installing and Securing Jenkins

    . Introduction to Jenkins The list of things that Jenkins has to offer is huge due to the rich plugin system it has. Basically, Jenkins is just a tool which connects all kinds of different tools and plugins together to create a report for you. For example, it can run PHPUnit and show you the results
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. Unit Testing with GuzzlePHP

    file will look as follows: { "require": { "php": ">=5.3.3", } "require-dev": { "phpunit/phpunit": "4.0.*", "guzzle/guzzle": "~3.7" } } I’ve stipulated
  19. 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
  20. 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