library promise-test
An abstract test file to ensure compatibility between promise implementations.
async-interop/promise-test
An abstract test file to ensure compatibility between promise implementations.
- Saturday, January 7, 2017
- by bwoebi
- Repository
- 4 Watchers
- 2 Stars
- 728 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Promise Tests
This package provides a quite extensive phpunit test suite to be used against Promise
implementations from the async-interop/promise package., (*1)
Usage
class MyDriverTest extends \Interop\Async\Promise\Test {
function getFactory() {
return new MyDriverFactory;
}
function getPromise() {
$resolver = new MyPromiseResolver;
return [
$resolver->promise(),
function($v) use ($resolver) { $resolver->succeed($v); },
function($e) use ($resolver) { $resolver->fail($e); },
];
}
}
That's it. Put it in your tests folder with an appropriate phpunit setup and run it., (*2)
dev-master
9999999-dev
An abstract test file to ensure compatibility between promise implementations.
Sources
Download
MIT
The Requires
test
interop
async
promise
v0.4.1
0.4.1.0
An abstract test file to ensure compatibility between promise implementations.
Sources
Download
MIT
The Requires
test
interop
async
promise
v0.4.0
0.4.0.0
An abstract test file to ensure compatibility between promise implementations.
Sources
Download
MIT
The Requires
test
interop
async
promise