Archive for the ‘phpunit’ Category

Upgrading Sylius the TDD Way: Exploring Behat

Posted on: No Comments
Last time, we developed some new features on top of Sylius' core to indicate which products and their variants are low on stock and need replenishing. Now, we move on to seeing our changes in the UI, which means we will need to do a bit of StoryBDD tes...

Upgrading Sylius the TDD Way: Exploring PhpSpec

The post on developing and testing new Sylius features was an introduction to the three types of tests that are used in Sylius - PHPUnit, Phpspec and Behat. In this part, we'll extend some core classes to indicate color-coded inventory status. First, w...

Sylius and Cutting Your Teeth on TDD

Posted on: No Comments
Sylius is an e-commerce application / framework based on Symfony. It boasts 100% code coverage, which is impressive for a PHP application of that size. In this article, we are going to walk through the different kinds of tests available and try out so...

Testing PHP Code with Atoum – an Alternative to PHPUnit

Posted on: No Comments
If you’ve been around PHP for more than a little while, you’ve no doubt started to test your code. And if you ask anyone in the PHP space what to use for writing unit tests, likely the first answer that they’ll give you is PHPUnit. It’s the de ...

Hassle-Free Filesystem Operations during Testing? Yes Please!

Posted on: No Comments
When working with the filesystem in our tests suites, a big concern is cleaning up the temporary files after each test runs. However, if for any reason the test's execution is interrupted before the cleanup phase, further tests might fail, as the envir...

Testing Your Tests? Who Watches the Watchmen?

Posted on: No Comments
Regardless of whether you’re working for a big corporation, a startup, or just for yourself, unit testing is not only helpful, but often indispensable. We use unit tests to test our code, but what happens if our tests are wrong or incomplete? Wha...

An Overview of PHPUnit 5 – What’s New? What’s Coming?

It was January 2016 when the PHPUnit development team announced the release of PHPUnit 5.0. While several minor version have already been released since, PHPUnit's major version 5 has introduced several new functionalities and deprecated a few others...

Building a SparkPost Client: TDD with PhpUnit and Mockery

Posted on: No Comments
In a previous post, we looked at SparkPost (as an alternative to Mandrill), and explored a bit of the official PHP client. The official client handles a decent amount of work, but I got to thinking about what it would take to build a new client. The mo...

Using the Selenium Web Driver API with PHPUnit

Posted on: No Comments
Previously, we demonstrated using Selenium with PHPUnit and used a user subscription form example throughout the article. In this one, we are going to explore the Facebook package using the web driver API implementation. It is recommended you go throu...

BDD in Laravel: Getting Started with Behat and PhpSpec

Posted on: No Comments
Getting Started with BDD in Laravel Introduction BDD is a complicated subject for many developers, and getting started with it the right way often does not come easy - especially when needing to implement it into existing frameworks. This tutorial aims...