From e8a50af3c5242ef46a659a42fb6aea3ffa347f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Preu=C3=9F?= Date: Wed, 21 Apr 2021 23:36:33 +0200 Subject: [PATCH] Add on-off command test --- tests/Feature/OnOffCommandTest.php | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/Feature/OnOffCommandTest.php diff --git a/tests/Feature/OnOffCommandTest.php b/tests/Feature/OnOffCommandTest.php new file mode 100644 index 0000000..54b7f86 --- /dev/null +++ b/tests/Feature/OnOffCommandTest.php @@ -0,0 +1,36 @@ + ['debug' => true], + 'connection' => [ + 'secure' => true, + 'reconnect' => true, + 'rejoin' => true, + ], + 'channels' => ['ghostzero'] + ])); + + $called = false; + + $client->connect(function () use (&$called) { + $called = true; // mark this test as successful + }); + + sleep(3); + + self::assertTrue($called, ''); + } +}