diff --git a/composer.json b/composer.json index 55c44ea..d841e6e 100644 --- a/composer.json +++ b/composer.json @@ -5,12 +5,12 @@ "license": "MIT", "require": { "php": ">=5.4.0", - "async-interop/promise": "^0.3|dev-master", + "async-interop/promise": "^0.3", "phpunit/phpunit": "^4|^5" }, "autoload": { "psr-4": { - "Interop\\Async\\Promise\\": "src" + "AsyncInterop\\Promise\\": "src" } } } diff --git a/src/Test.php b/src/Test.php index 6bd4956..f41fc51 100644 --- a/src/Test.php +++ b/src/Test.php @@ -1,8 +1,8 @@ assertTrue($invoked); } - + function testSuccessAllWhensExecuted() { list($promise, $succeeder) = $this->promise(); $invoked = 0; - + $promise->when(function($e, $v) use (&$invoked) { $this->assertSame(null, $e); $this->assertSame(true, $v); @@ -79,7 +79,7 @@ abstract class Test extends \PHPUnit_Framework_TestCase { $this->assertSame(true, $v); $invoked++; }); - + $this->assertSame(4, $invoked); } @@ -102,7 +102,7 @@ abstract class Test extends \PHPUnit_Framework_TestCase { }); $this->assertTrue($invoked); } - + function testFailureAllWhensExecuted() { list($promise, , $failer) = $this->promise(); $invoked = 0;