1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00
amp/test/LoopTest.php

20 lines
446 B
PHP
Raw Normal View History

<?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 () {});
}
}