From 5d8bf00e42ec4c6c895e2d77010b3695ab5016f2 Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Sun, 3 Mar 2019 15:29:10 +0300 Subject: [PATCH] test for !fatal response added to ClientTest --- tests/ClientTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/ClientTest.php b/tests/ClientTest.php index d48b40c..cc6a7c2 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -157,6 +157,17 @@ class ClientTest extends TestCase $this->assertEquals('!trap', $readTrap[0]); } + public function testFatal() + { + $config = new Config(); + $config->set('user', 'admin')->set('pass', 'admin')->set('host', '127.0.0.1'); + $obj = new Client($config); + + $readTrap = $obj->wr('/quit'); + $this->assertCount(2, $readTrap); + $this->assertEquals('!fatal', $readTrap[0]); + } + public function testWriteEx() { $this->expectException(QueryException::class);