Browse Source

coverage of Query class increased

tags/0.8
Paul Rock 7 years ago
parent
commit
93f92be2cf
  1. 17
      tests/QueryTest.php

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

Loading…
Cancel
Save