Remove test Tests\Icinga\Web\Paginator\ScrollingStyle\SlidingwithborderTest::testGetPages1 because it tests a non-present feature

refs #6542
This commit is contained in:
Alexander Klimov 2014-06-27 14:23:35 +02:00
parent b2ffa2aa89
commit 572c7858c8
1 changed files with 2 additions and 53 deletions

View File

@ -8,63 +8,12 @@ namespace Tests\Icinga\Web\Paginator\ScrollingStyle;
require_once realpath(ICINGA_LIBDIR . '/Icinga/Web/Paginator/ScrollingStyle/SlidingWithBorder.php');
// @codingStandardsIgnoreEnd
use \Mockery;
use \Zend_Config;
use \Zend_Paginator;
use Mockery;
use Zend_Paginator;
use Icinga\Test\BaseTestCase;
use Icinga\Protocol\Statusdat\Reader;
use Icinga\Web\Paginator\Adapter\QueryAdapter;
use Icinga\Module\Monitoring\Backend;
class SlidingwithborderTest extends BaseTestCase
{
private $cacheDir;
private $backendConfig;
private $resourceConfig;
public function setUp()
{
parent::setUp();
$this->cacheDir = '/tmp'. Reader::STATUSDAT_DEFAULT_CACHE_PATH;
if (!file_exists($this->cacheDir)) {
mkdir($this->cacheDir);
}
$statusdatFile = BaseTestCase::$testDir . '/res/status/icinga.status.dat';
$cacheFile = BaseTestCase::$testDir . '/res/status/icinga.objects.cache';
$this->backendConfig = new Zend_Config(
array(
'type' => 'statusdat'
)
);
$this->resourceConfig = new Zend_Config(
array(
'status_file' => $statusdatFile,
'object_file' => $cacheFile,
'type' => 'statusdat'
)
);
}
public function testGetPages1()
{
$backend = new Backend($this->backendConfig, $this->resourceConfig);
$adapter = new QueryAdapter($backend->select()->from('status'));
$this->assertEquals(30, $adapter->count());
$scrollingStyle = new \Icinga_Web_Paginator_ScrollingStyle_SlidingWithBorder();
$paginator = new Zend_Paginator($adapter);
$pages = $scrollingStyle->getPages($paginator);
$this->assertInternalType('array', $pages);
$this->assertCount(3, $pages);
}
public function testGetPages2()
{
$scrollingStyle = new \Icinga_Web_Paginator_ScrollingStyle_SlidingWithBorder();