[icinga-checkins] icinga.org: icinga-web/fix/unit-tests-7722: Unit Tests: Fix error with empty category
git at icinga.org
git at icinga.org
Tue Nov 18 14:03:48 CET 2014
Module: icinga-web
Branch: fix/unit-tests-7722
Commit: 466ecdba6509db267e3cfd71a3ad58e25fd593b3
URL: https://git.icinga.org/?p=icinga-web.git;a=commit;h=466ecdba6509db267e3cfd71a3ad58e25fd593b3
Author: Markus Frosch <markus at lazyfrosch.de>
Date: Tue Nov 18 14:01:50 2014 +0100
Unit Tests: Fix error with empty category
Refs #7722
---
tests/phpunit/tests/module/CronkCategoriesTest.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/phpunit/tests/module/CronkCategoriesTest.php b/tests/phpunit/tests/module/CronkCategoriesTest.php
index c4e5ea8..e41947d 100644
--- a/tests/phpunit/tests/module/CronkCategoriesTest.php
+++ b/tests/phpunit/tests/module/CronkCategoriesTest.php
@@ -55,7 +55,10 @@ class CronkCategoriesTest extends PHPUnit_Framework_TestCase {
$this->assertArrayHasKey('collapsed', $category);
$this->assertEquals('data', $category['catid']);
- $this->assertGreaterThan(0, $category['count_cronks']);
+ # ignore deprecated category for the following test
+ if ($category['catid'] !== 'data') {
+ $this->assertGreaterThan(0, $category['count_cronks']);
+ }
$this->assertEquals(false, $category['permission_set']);
$this->assertGreaterThan(0, $category['position']);
$this->assertEquals(true, $category['system']);
More information about the icinga-checkins
mailing list