Benign php 10,222,315 installs Download

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

Evidence

GitHub service URL reference README.md · lines 1–8
1[![.github/workflows/tests.yml](https://github.com/php-mock/php-mock-phpunit/actions/workflows/tests.yml/badge.svg)](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 …
PHP script path suffix autoload.php · lines 86–92
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 …
Hardcoded Bitcoin address DefaultArgumentRemoverReturnTypes100.php · lines 1–18
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 …
Constructs a PHP ReflectionClass DefaultArgumentRemoverReturnTypes100.php · lines 95–101
95:2… return $invocation;
96 }
97
98 $reflection = new ReflectionClass($invocation);
99
100 $reflectionReturnType = $reflection->getProperty('returnType');
101 $reflectionReturnType->setAccess …
PHP invokes computed callable expression MockDisablerPHPUnit10.php · lines 1–48
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

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.