PHP Package: codeception/stub

Codeception Stub is a PHP library for creating and managing test doubles efficiently.

Current Version: 4.1.4
Last Updated: 2025-02-14
PHP Requirement: ^7.4 | ^8.0
Dependencies:
phpunit/phpunit
mockery/mockery
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Codeception Stub is a versatile PHP library that provides tools to create mock objects, stubs, and spies for testing purposes. With its intuitive API, developers can streamline unit testing workflows by easily simulating complex dependencies. Whether mocking external services or isolating components, Codeception Stub enhances test coverage and reliability. Leveraging this library, developers can simulate diverse scenarios, interactions, and responses, ensuring robust test suites that validate code behavior comprehensively.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 4.1.4

Download Download v4.1.4

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/codeception/stub/4.1.4/loader.php';
require_once 'libs/sebastianbergmann/phpunit/12.2.2/loader.php';
require_once 'libs/mockery/mockery/1.6.12/loader.php';

use Codeception\Stub\Mock;

$obj = new Mock();
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.