aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'assets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php')
-rwxr-xr-xassets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/assets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php b/assets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php
deleted file mode 100755
index f8b7df3..0000000
--- a/assets/php/vendor/react/event-loop/tests/SignalsHandlerTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-namespace React\Tests\EventLoop;
-
-use React\EventLoop\SignalsHandler;
-
-final class SignalsHandlerTest extends TestCase
-{
- public function testEmittedEventsAndCallHandling()
- {
- $callCount = 0;
- $func = function () use (&$callCount) {
- $callCount++;
- };
- $signals = new SignalsHandler();
-
- $this->assertSame(0, $callCount);
-
- $signals->add(SIGUSR1, $func);
- $this->assertSame(0, $callCount);
-
- $signals->add(SIGUSR1, $func);
- $this->assertSame(0, $callCount);
-
- $signals->add(SIGUSR1, $func);
- $this->assertSame(0, $callCount);
-
- $signals->call(SIGUSR1);
- $this->assertSame(1, $callCount);
-
- $signals->add(SIGUSR2, $func);
- $this->assertSame(1, $callCount);
-
- $signals->add(SIGUSR2, $func);
- $this->assertSame(1, $callCount);
-
- $signals->call(SIGUSR2);
- $this->assertSame(2, $callCount);
-
- $signals->remove(SIGUSR2, $func);
- $this->assertSame(2, $callCount);
-
- $signals->remove(SIGUSR2, $func);
- $this->assertSame(2, $callCount);
-
- $signals->call(SIGUSR2);
- $this->assertSame(2, $callCount);
-
- $signals->remove(SIGUSR1, $func);
- $this->assertSame(2, $callCount);
-
- $signals->call(SIGUSR1);
- $this->assertSame(2, $callCount);
- }
-}