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');