mirror of
https://github.com/danog/amp.git
synced 2024-12-03 09:57:51 +01:00
Remove tests incompatible with ext-fiber
This commit is contained in:
parent
6ce8cba91c
commit
b226030a11
@ -21,25 +21,6 @@ class DelayedTest extends AsyncTestCase
|
||||
$this->assertGreaterThanOrEqual($time - 1 /* 1ms grace period */, (\microtime(true) - $start) * 1000);
|
||||
}
|
||||
|
||||
public function testUnreference(): void
|
||||
{
|
||||
$time = 100;
|
||||
$value = "test";
|
||||
|
||||
$promise = new Delayed($time, $value);
|
||||
$promise->unreference();
|
||||
|
||||
$this->ignoreLoopWatchers();
|
||||
|
||||
$this->expectException(\FiberError::class);
|
||||
$this->expectExceptionMessage("Scheduler ended");
|
||||
|
||||
await($promise);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testUnreference
|
||||
*/
|
||||
public function testReference(): void
|
||||
{
|
||||
$time = 100;
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
namespace Amp\Test;
|
||||
|
||||
use Amp\Deferred;
|
||||
use Amp\Delayed;
|
||||
use Amp\Failure;
|
||||
use Amp\Loop;
|
||||
use Amp\PHPUnit\AsyncTestCase;
|
||||
use Amp\PHPUnit\TestException;
|
||||
use Amp\Promise;
|
||||
use Amp\Success;
|
||||
use function Amp\call;
|
||||
@ -57,14 +54,6 @@ class WaitTest extends AsyncTestCase
|
||||
$this->assertSame($value, $result);
|
||||
}
|
||||
|
||||
public function testPromiseWithNoResolutionPathThrowsException(): void
|
||||
{
|
||||
$this->expectException(\FiberError::class);
|
||||
$this->expectExceptionMessage("Scheduler ended");
|
||||
|
||||
Promise\wait((new Deferred)->promise());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testWaitOnSuccessfulPromise
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user