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

20 lines
408 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(\Error::class);
Loop::delay(-1, function () {});
}
public function testRepeatWithNegativeInterval() {
$this->expectException(\Error::class);
Loop::repeat(-1, function () {});
}
}