Tagged articles
phpunit
13 articles · Page 1 of 1

21CTOFeb 3, 2026 · Information Security
A high‑severity CVE‑2026‑24765 in the widely used PHP unit‑testing framework PHPUnit allows attackers to inject malicious coverage files that trigger unsafe deserialization and remote code execution during CI/CD test runs, prompting immediate upgrades to patched releases across all active branches.
PHPRCEcve-2026-24765
0 likes · 4 min read

This article introduces ten essential PHP libraries—ranging from HTTP clients and logging tools to testing frameworks, date handling, fake data generation, database abstraction, email sending, templating, dependency injection, and debugging—explaining their core features and providing concise code examples to boost backend development productivity.
DoctrineGuzzleLibraries
0 likes · 7 min read

This article explains how to use php-code-coverage and the pcov extension to collect line, branch, and path coverage for PHP projects, introduces incremental coverage based on diff files, discusses configuration methods, performance optimizations, and practical lessons learned from real‑world deployment.
PHPautomationcode coverage
0 likes · 14 min read

This article explains the concept and importance of software testing, outlines various test types, and provides a step‑by‑step guide with code examples on installing PHPUnit, creating a Calculator class, writing unit tests, and running them to ensure reliable PHP applications.
PHPbackend developmentphpunit
0 likes · 7 min read

This guide explains why an in‑memory SQLite database is ideal for PHP unit testing, outlines its key benefits such as isolation, speed, and resource efficiency, and provides step‑by‑step code examples for setup, data handling, cleanup, exception handling, schema verification, data providers, and transaction testing.
PHPSQLitein-memory database
0 likes · 9 min read

This guide introduces PHPUnit for PHP, explains how to install and configure it with Composer, and demonstrates common assertions such as assertEquals, assertNotEmpty, assertFalse, assertIsNumeric, and assertSame through practical real-world code examples.
PHPTDDassertions
0 likes · 5 min read

Learn step-by-step how to create a PHP Composer package, configure its composer.json, implement code with PSR‑4 autoloading, write PHPUnit tests, manage Git commits, publish to Packagist, and install the package via Composer, complete with practical commands and examples.
ComposerPHPPSR-4
0 likes · 10 min read

This guide walks through configuring CLI interpreter path mappings, setting up Docker container paths, installing PHPUnit, creating a comprehensive phpunit.xml configuration, organizing test directories, writing a bootstrap script, and generating test reports, providing a complete backend testing workflow for PHP projects.
Backend testingConfigurationDocker
0 likes · 4 min read

This guide introduces the PEST PHP testing framework, explains its key features and expressive syntax, and demonstrates how to write tests using the “it” and “test” functions with practical code examples for common arithmetic operations.
BackendPHPPest
0 likes · 6 min read

The article outlines the importance of independent, code‑aware testing, describes the test automation pyramid and its focus on API tests, explains how automated testing, continuous integration, and deployment enable continuous delivery, and lists the essential skills and mindset for test developers.
CIContinuous DeliveryDevOps
0 likes · 6 min read

PHPUnit 10, requiring PHP 8.1+, introduces a new event system, clearer test result classifications, PHP 8 attribute metadata support, and updated code‑coverage tools, while providing PHAR and Composer installation methods, representing a major modernization of the PHP testing framework.
CodeCoveragePHPUnitTesting
0 likes · 5 min read

The article introduces php-code-coverage, an open‑source library that collects, processes, and visualizes PHP code‑coverage data, explains its measurement metrics such as line, function, and class coverage, and shows how to integrate it with PHPUnit, Composer, and Jenkins for automated testing and quality assessment.
CIJenkinscode coverage
0 likes · 5 min read


21CTONov 6, 2015 · Backend Development
This article explains why automated testing is essential for PHP developers, outlines the benefits of test-driven development, and reviews the most popular PHP testing frameworks—including PHPUnit, Codeception, Behat, PHPSpec, SimpleTest, Storyplayer, Peridot, Atoum, Kahlan, and Selenium—to help you choose the right tool.
CodeceptionPHPautomated testing
0 likes · 8 min read
