diff --git a/library/Icinga/Web/Widget.php b/library/Icinga/Web/Widget.php index bc160dcdb..8d8f3d5a2 100644 --- a/library/Icinga/Web/Widget.php +++ b/library/Icinga/Web/Widget.php @@ -1,8 +1,7 @@ create('tab', array('name' => 'TEST')); + + $this->assertInstanceOf('Icinga\Web\Widget\Tab', $widget); + } + + /** + * @expectedException Icinga\Exception\ProgrammingError + * @expectedExceptionMessage There is no such widget: DOES_NOT_EXIST + */ + public function testFail1() + { + $widgetCreator = new Widget(); + $widget = $widgetCreator->create('DOES_NOT_EXIST'); + } +} \ No newline at end of file