Jannis Moßhammer 44be5e85da Refactoring and Query and IDO code,
the Monitoring/View code was completly dropped in favor of
the DataView implementations, as new Backends otherwise
would require to implement two seperate query logics

refs #3801
2013-10-17 19:54:58 +02:00

34 lines
768 B
PHP
Executable File

<?php
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/BaseQuery.php');
require_once('../../library/Icinga/Protocol/Livestatus/Connection.php');
require_once('../../library/Icinga/Protocol/Livestatus/Query.php');
/**
*
* Test class for Connection
*
**/
class ConnectionTest extends TestCase
{
/**
* Test for Connection::Select()
*
**/
public function testSelect()
{
$socket = tempnam(sys_get_temp_dir(), 'IcingaTest');
$connection = new Connection($socket);
$this->assertTrue($connection->select() instanceof Query);
unlink($socket);
}
}