Fix GeneralForm tests

refs #4639
This commit is contained in:
Johannes Meyer 2014-04-10 14:08:11 +02:00
parent 1e69169bab
commit fe9cff843d
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,10 @@
namespace Tests\Icinga\Form\Config;
// @codingStandardsIgnoreStart
require_once realpath(ICINGA_APPDIR . '/views/helpers/DateFormat.php');
// @codingStandardsIgnoreEnd
use \DateTimeZone;
use \DOMDocument;
use \Zend_Config;
@ -37,6 +41,7 @@ class GeneralFormTest extends BaseTestCase
*/
public function testCorrectFieldPopulation()
{
$this->markTestSkipped('GeneralForm uses the url view helper (icon helper function). Set a view mock with setView!');
DateTimeFactory::setConfig(array('timezone' => new DateTimeZone('UTC')));
$form = $this->createForm('Icinga\Form\Config\GeneralForm');
$form->setDateFormatter(new Zend_View_Helper_DateFormat($this->getRequest()));
@ -113,6 +118,7 @@ class GeneralFormTest extends BaseTestCase
public function testCorrectConditionalIniFieldRendering()
{
$this->markTestSkipped('GeneralForm uses the url view helper (icon helper function). Set a view mock with setView!');
DateTimeFactory::setConfig(array('timezone' => new DateTimeZone('UTC')));
$form = $this->createForm('Icinga\Form\Config\GeneralForm');
$form->setDateFormatter(new Zend_View_Helper_DateFormat($this->getRequest()));
@ -150,6 +156,7 @@ class GeneralFormTest extends BaseTestCase
public function testCorrectConditionalDbFieldRendering()
{
$this->markTestSkipped('GeneralForm uses the url view helper (icon helper function). Set a view mock with setView!');
DateTimeFactory::setConfig(array('timezone' => new DateTimeZone('UTC')));
$form = $this->createForm('Icinga\Form\Config\GeneralForm');
$form->setDateFormatter(new Zend_View_Helper_DateFormat($this->getRequest()));

View File

@ -4,6 +4,10 @@
namespace Tests\Icinga\Form\Preference;
// @codingStandardsIgnoreStart
require_once realpath(ICINGA_APPDIR . '/views/helpers/DateFormat.php');
// @codingStandardsIgnoreEnd
use \DateTimeZone;
use \Zend_View_Helper_DateFormat;
use Icinga\Test\BaseTestCase;