From 0c77b964fe611ea672831f66383da09501970396 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Sat, 7 Jan 2017 11:47:58 +0100 Subject: [PATCH] Change namespace to AsyncInterop --- composer.json | 4 ++-- src/Test.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) 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;