Please enable JS

Overview

PHPUnit Code Coverage Analysis

  0 reviews
6.00

Code coverage helps you detect which areas of your application are not covered with tests. Imagine if you have a number of classes in your domain and you have tests for them. In order to determine which method has tests written for it, you would have to manually check the tests to see if it has any tests that cover that method. Also, you would have to check if the test for that method covers all possibilities inside that method; This refers to if statements and branching.

As is turns out, a package I wrote called Ekko that helps you detect which menu item is active based on current URL and apply an appropriate CSS class to that item, already has tests written for it in PHPUnit. This is the perfect scenario for demonstrating what code coverage is, how to achieve maximum code coverage and why.

SAMPLE

SKU: phpunit-code-coverage-analysis
Author Mario Bašić
Words 1,647
Published At June 29, 2016
Last Updated October 06, 2017

No reviews yet.

Related Tutorials

Laravel API 101: TEST

Laravel comes out-of-the-box with great testing suite built on PHPUnit. No API should be left untested.

25.00  19.99

Laravel API 101: CONSUME

We will create a new Laravel application which connects to the API that we have built in the previous lessons.

25.00  19.99

Laravel API 101: BUILD

In this lesson we will build an API using Laravel for managing news articles.

25.00  19.99
Instant Delivery
24/7 Customer Service
Payment Options
7 Days Refunds
Laravel
PHP
React.js
Vue.js
Composer
Nginx
Ubuntu
Linux
Windows
Codeception
MySQL
Lumen

Newsletter