mirror of
https://github.com/danog/amp.git
synced 2025-01-22 21:31:18 +01:00
20 lines
408 B
PHP
20 lines
408 B
PHP
<?php
|
|
|
|
namespace Amp\Test;
|
|
|
|
use Amp\Loop;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class LoopTest extends TestCase {
|
|
public function testDelayWithNegativeDelay() {
|
|
$this->expectException(\Error::class);
|
|
|
|
Loop::delay(-1, function () {});
|
|
}
|
|
|
|
public function testRepeatWithNegativeInterval() {
|
|
$this->expectException(\Error::class);
|
|
|
|
Loop::repeat(-1, function () {});
|
|
}
|
|
} |