PHP Package: wp-phpunit/wp-phpunit
WP-PHPUnit is a PHP library designed for WordPress developers to streamline unit testing and ensure code quality using PHPUnit integration.
Package Description
WP-PHPUnit is a comprehensive PHP library that enables WordPress developers to conduct efficient unit testing for their projects. By seamlessly integrating with PHPUnit, this library provides a robust suite of tools to facilitate dependable testing procedures and enhance code quality throughout the development lifecycle.
Download Latest Version: 6.9.4
Previous Versions
Code Integration Example
Make sure to include the correct namespace and class paths for proper usage.
<?php
// Example from PHPlibraries.com
require_once 'libs/wp-phpunit/wp-phpunit/6.9.4/loader.php';
require_once 'libs/sebastianbergmann/phpunit/13.0.5/loader.php';
require_once 'libs/wordpress/wordpress/{lib_version}/loader.php';
use WP_PHPUnit\TestClass;
use WP_PHPUnit\Helper\TestHelper;
$obj = new TestClass();
echo '✅ Test OK: ' . get_class($obj);
?>We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.
Community Discussion
Ask questions, share tips, or report issues below.
