mirror of
https://github.com/danog/amp.git
synced 2024-11-26 20:15:00 +01:00
Change namespace to AsyncInterop
This commit is contained in:
parent
06ea46effb
commit
0c77b964fe
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
src/Test.php
12
src/Test.php
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Interop\Async\Promise;
|
||||
namespace AsyncInterop\Promise;
|
||||
|
||||
use Interop\Async\Promise;
|
||||
use AsyncInterop\Promise;
|
||||
|
||||
abstract class Test extends \PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
@ -51,11 +51,11 @@ abstract class Test extends \PHPUnit_Framework_TestCase {
|
||||
});
|
||||
$this->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;
|
||||
|
Loading…
Reference in New Issue
Block a user