mirror of
https://github.com/danog/amp.git
synced 2025-01-22 13:21:16 +01:00
Test CHANGELOG and composer.json updates
This commit is contained in:
parent
bdd340c3f3
commit
4e3a7598ef
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,7 +1,18 @@
|
||||
v0.4.0
|
||||
v0.5.0
|
||||
------
|
||||
|
||||
#### master
|
||||
- Pare down the Promise/Future APIs
|
||||
- Minor performance improvements
|
||||
|
||||
> **BC BREAKS**:
|
||||
|
||||
- Removed `Future::isPending()`
|
||||
- Removed `Future::failed()`
|
||||
- Removed `Future::onSuccess()`
|
||||
- Removed `Future::onFailure()`
|
||||
|
||||
v0.4.0
|
||||
------
|
||||
|
||||
- Altered watcher ID generation to avoid potential collisions
|
||||
- Added optional $onStart callback parameter to Reactor::run() implementations
|
||||
|
@ -18,6 +18,6 @@
|
||||
"files": ["src/bootstrap.php"]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "0.4.x-dev"
|
||||
"dev-master": "0.5.x-dev"
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class LibeventReactorTest extends \PHPUnit_Framework_TestCase {
|
||||
public function testReactorAllowsExceptionToBubbleUpDuringTick() {
|
||||
$this->skipIfMissingExtLibevent();
|
||||
$reactor = new LibeventReactor;
|
||||
$reactor->once(function(){ throw new RuntimeException('test'); }, $delay = 0);
|
||||
$reactor->once(function(){ throw new \RuntimeException('test'); }, $delay = 0);
|
||||
$reactor->tick();
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ class LibeventReactorTest extends \PHPUnit_Framework_TestCase {
|
||||
public function testReactorAllowsExceptionToBubbleUpDuringRun() {
|
||||
$this->skipIfMissingExtLibevent();
|
||||
$reactor = new LibeventReactor;
|
||||
$reactor->once(function(){ throw new RuntimeException('test'); }, $delay = 0);
|
||||
$reactor->once(function(){ throw new \RuntimeException('test'); }, $delay = 0);
|
||||
$reactor->run();
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ class LibeventReactorTest extends \PHPUnit_Framework_TestCase {
|
||||
public function testReactorAllowsExceptionToBubbleUpFromRepeatingAlarmDuringRun() {
|
||||
$this->skipIfMissingExtLibevent();
|
||||
$reactor = new LibeventReactor;
|
||||
$reactor->repeat(function(){ throw new RuntimeException('test'); }, $interval = 0);
|
||||
$reactor->repeat(function(){ throw new \RuntimeException('test'); }, $interval = 0);
|
||||
$reactor->run();
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ class LibeventReactorTest extends \PHPUnit_Framework_TestCase {
|
||||
$this->skipIfMissingExtLibevent();
|
||||
$reactor = new LibeventReactor;
|
||||
|
||||
$reactor->onWritable(STDOUT, function() { throw new RuntimeException; });
|
||||
$reactor->onWritable(STDOUT, function() { throw new \RuntimeException; });
|
||||
$reactor->once(function() use ($reactor) { $reactor->stop(); }, 0.05);
|
||||
$reactor->run();
|
||||
}
|
||||
@ -262,16 +262,4 @@ class LibeventReactorTest extends \PHPUnit_Framework_TestCase {
|
||||
$reactor->run();
|
||||
}
|
||||
|
||||
public function testAfterForkReinitializesWatchers() {
|
||||
$this->skipIfMissingExtLibevent();
|
||||
|
||||
$reactor = new LibeventReactor();
|
||||
|
||||
$reactor->onWritable(STDOUT, function() use ($reactor) { $reactor->stop(); });
|
||||
$reactor->beforeFork();
|
||||
$reactor->afterFork();
|
||||
|
||||
$reactor->run();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class PromiseTest extends \PHPUnit_Framework_TestCase {
|
||||
$reactor = new NativeReactor;
|
||||
$promise = new Promise;
|
||||
$future = $promise->getFuture();
|
||||
$future->onSuccess(function(Future $f) use ($reactor) {
|
||||
$future->onComplete(function(Future $f) use ($reactor) {
|
||||
$this->assertSame(42, $f->getValue());
|
||||
$reactor->stop();
|
||||
});
|
||||
@ -40,7 +40,8 @@ class PromiseTest extends \PHPUnit_Framework_TestCase {
|
||||
$promise = new Promise;
|
||||
$future = $promise->getFuture();
|
||||
$error = new \Exception("test");
|
||||
$future->onFailure(function(Future $f) use ($reactor, $error) {
|
||||
$future->onComplete(function(Future $f) use ($reactor, $error) {
|
||||
$this->assertFalse($f->succeeded());
|
||||
$this->assertSame($error, $f->getError());
|
||||
$reactor->stop();
|
||||
});
|
||||
@ -56,6 +57,7 @@ class PromiseTest extends \PHPUnit_Framework_TestCase {
|
||||
$future = $promise->getFuture();
|
||||
$error = new \Exception("test");
|
||||
$future->onComplete(function(Future $f) use ($reactor, $error) {
|
||||
$this->assertFalse($f->succeeded());
|
||||
$this->assertSame($error, $f->getError());
|
||||
$reactor->stop();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user