Registry / testing / ptrofimov-xpmock

ptrofimov-xpmock

JSON →
library1.1.5phppackagistunverified

PHPUnit: simple syntax to create mock-objects.

composer require ptrofimov/xpmock
INSTALL
IMPORT
SIG · PTROFIMOV-XPMOCK
P
ptrofimov-xpmock
testingphpv1.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestCaseTrait
use XPMock\TestCaseTrait;

Use the TestCaseTrait to create mocks with a simple syntax.

use XPMock\TestCaseTrait; class MyTest extends \PHPUnit\Framework\TestCase { use TestCaseTrait; public function testMock() { $mock = $this->mock('SomeClass'); $mock->shouldReceive('method')->once()->andReturn('value'); } }
Debug
Known issues
breakingRequires PHPUnit 6+; not compatible with PHPUnit 10+.
fix
Use PHPUnit's built-in mocking or Mockery.
affects: >=1.0.0
Upgrade
Version history
1.1.5latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
ptrofimov-xpmock — pip install ptrofimov-xpmock · libregistry