From 93f92be2cf2b06819af0de6840ca216fc08f9547 Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Sun, 17 Feb 2019 14:10:36 +0300 Subject: [PATCH] coverage of Query class increased --- tests/QueryTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/QueryTest.php b/tests/QueryTest.php index 9044a6d..716c9c5 100644 --- a/tests/QueryTest.php +++ b/tests/QueryTest.php @@ -28,6 +28,16 @@ class QueryTest extends TestCase } } + public function test__construct_arr2() + { + try { + $obj = new Query(['test', 'line1', 'line2', 'line3']); + $this->assertInternalType('object', $obj); + } catch (\Exception $e) { + $this->assertContains('Must be initialized ', $e->getMessage()); + } + } + public function testGetEndpoint() { $obj = new Query('test'); @@ -35,6 +45,13 @@ class QueryTest extends TestCase $this->assertEquals($test, 'test'); } + public function testGetEndpoint2() + { + $obj = new Query(['zzz', 'line1', 'line2', 'line3']); + $test = $obj->getEndpoint(); + $this->assertEquals($test, 'zzz'); + } + public function testSetEndpoint() { $obj = new Query('test');