php-mock/php-mock-phpunit 2.13.0
“Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is nee…”
Basename is uppercase README.mdCalls PHP fputs function
SHA-2560f59f7178b02c109c6a27f8754e1ceed89f1e9282dafca4ab62d0d333764f895
Evidence
1[](https://github.com/php-mock/php-mock-phpunit/actions/workflows/tests.yml)
2
3# Mock PHP built-in functions with PHPUnit
4
5This package integrates the function mock library
6[PHP-Mock](https://github.com/php-mock/php-mock) with PHPUnit.
7
8## Instal …
86:31… nit\Framework\BaseTestListener::class)) {
87 include __DIR__ . '/compatibility/BaseTestListener.php';
88 class_alias(
89 phpmock\phpunit\MockDisablerPHPUnit7::class,
90 phpmock\phpunit\MockDisabler::class
91 );
92} els …
1<?php
2
3namespace phpmock\phpunit;
4
5use phpmock\generator\MockFunctionGenerator;
6use PHPUnit\Framework\MockObject\Invocation;
7use PHPUnit\Framework\MockObject\Rule\InvocationOrder;
8use ReflectionClass;
9
10/**
11 * Removes default arguments from the invocation.
12 *
13 * @author Markus Malkusch <markus@malkusch.de>
14 * @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
15 * @license http://www.wtfpl.net/txt/copying/ WTFPL
16 * @internal
17 */
18class DefaultArgumentRemoverReturnTypes100 exten …
95:2… return $invocation;
96 }
97
98 $reflection = new ReflectionClass($invocation);
99
100 $reflectionReturnType = $reflection->getProperty('returnType');
101 $reflectionReturnType->setAccess …
1<?php
2
3namespace phpmock\phpunit;
4
5use Closure;
6use phpmock\Deactivatable;
7use PHPUnit\Event\Test\Finished;
8use PHPUnit\Event\Test\FinishedSubscriber;
9
10/**
11 * Test listener for PHPUnit integration.
12 *
13 * This class disables mock functions after a test was run.
14 *
15 * @author Markus Malkusch <markus@malkusch.de>
16 * @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
17 * @license http://www.wtfpl.net/txt/copying/ WTFPL
18 * @internal
19 */
20class MockDisablerPHPUnit10 implements FinishedSubscriber
21{
22 /**
23 * @var Deactivatable The function mocks.
24 */
25 private $deactivatable;
⋯23 lines
Showing the top 5 files — 3 more files (13 regions) not shown.
No evidence locations were recorded for this file. Raw result