mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
20 lines
446 B
PHP
20 lines
446 B
PHP
|
<?php
|
||
|
|
||
|
namespace Amp\Test;
|
||
|
|
||
|
use Amp\Loop;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class LoopTest extends TestCase {
|
||
|
public function testDelayWithNegativeDelay() {
|
||
|
$this->expectException(\InvalidArgumentException::class);
|
||
|
|
||
|
Loop::delay(-1, function () {});
|
||
|
}
|
||
|
|
||
|
public function testRepeatWithNegativeInterval() {
|
||
|
$this->expectException(\InvalidArgumentException::class);
|
||
|
|
||
|
Loop::repeat(-1, function () {});
|
||
|
}
|
||
|
}
|