mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Update tests for CombinatorException, prepare tag 1.0.5
This commit is contained in:
parent
00898cd6af
commit
3057329a5c
@ -1,6 +1,6 @@
|
||||
# dev
|
||||
### 1.0.5
|
||||
|
||||
- Convert general `\RuntimeException` to more specific
|
||||
- Convert general `RuntimeException` to more specific
|
||||
`Amp\CombinatorException`.
|
||||
|
||||
### 1.0.4
|
||||
|
@ -2,6 +2,4 @@
|
||||
|
||||
namespace Amp;
|
||||
|
||||
class CombinatorException extends \RuntimeException {
|
||||
|
||||
}
|
||||
class CombinatorException extends \RuntimeException {}
|
@ -412,7 +412,7 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedException \Amp\CombinatorException
|
||||
*/
|
||||
public function testSomeThrowsIfNoPromisesResolveSuccessfully() {
|
||||
\Amp\some([
|
||||
@ -481,7 +481,7 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedException \Amp\CombinatorException
|
||||
* @expectedExceptionMessage All promises failed
|
||||
*/
|
||||
public function testFirstFailsIfAllPromisesFail() {
|
||||
@ -494,7 +494,7 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedException \Amp\TimeoutException
|
||||
* @expectedExceptionMessage Promise resolution timed out
|
||||
*/
|
||||
public function testTimeout() {
|
||||
@ -521,7 +521,7 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage nothing that is worth knowing can be taught
|
||||
*/
|
||||
public function testTimeoutOnFailure() {
|
||||
@ -625,7 +625,7 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedException \Amp\CombinatorException
|
||||
*/
|
||||
public function testExplicitSomeCombinatorResolutionFailsOnError() {
|
||||
\Amp\run(function () {
|
||||
|
Loading…
Reference in New Issue
Block a user