Update Livestatus tests

This commit is contained in:
Eric Lippmann 2013-07-12 14:02:43 +02:00
parent 2c6f8a8441
commit d51b00b508
2 changed files with 25 additions and 5 deletions

View File

@ -1,13 +1,21 @@
<?php <?php
namespace Tests\Icinga\Protocol\Livestatus; namespace Tests\Icinga\Protocol\Livestatus;
use Icinga\Protocol\Livestatus\Connection;
use Icinga\Protocol\Livestatus\Query;
use PHPUnit_Framework_TestCase as TestCase;
require_once('../../library/Icinga/Protocol/AbstractQuery.php');
require_once('../../library/Icinga/Protocol/Livestatus/Connection.php');
require_once('../../library/Icinga/Protocol/Livestatus/Query.php');
/** /**
* *
* Test class for Connection * Test class for Connection
* Created Wed, 16 Jan 2013 15:15:16 +0000
* *
**/ **/
class ConnectionTest extends \PHPUnit_Framework_TestCase class ConnectionTest extends TestCase
{ {
/** /**
@ -25,7 +33,10 @@ class ConnectionTest extends \PHPUnit_Framework_TestCase
**/ **/
public function testSelect() public function testSelect()
{ {
$this->markTestIncomplete('testSelect is not implemented yet'); $socket = tempnam(sys_get_temp_dir(), 'IcingaTest');
$connection = new Connection($socket);
$this->assertTrue($connection->select() instanceof Query);
unlink($socket);
} }
/** /**

View File

@ -1,13 +1,22 @@
<?php <?php
namespace Tests\Icinga\Protocol\Livestatus; namespace Tests\Icinga\Protocol\Livestatus;
use Icinga\Protocol\Livestatus\Connection;
use Icinga\Protocol\Livestatus\Query;
use PHPUnit_Framework_TestCase as TestCase;
require_once('../../library/Icinga/Protocol/AbstractQuery.php');
require_once('../../library/Icinga/Protocol/Livestatus/Query.php');
require_once('../../library/Icinga/Protocol/Livestatus/Connection.php');
/** /**
* *
* Test class for Query * Test class for Query
* Created Wed, 16 Jan 2013 15:15:16 +0000
* *
**/ **/
class QueryTest extends \PHPUnit_Framework_TestCase class QueryTest extends TestCase
{ {
/** /**