From ee62801ace2383c8f59111003bc9cf232fe29be2 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 6 Apr 2017 11:11:58 -0600 Subject: [PATCH] W.I.P. Some more Etemplate testing stuff --- .../Etemplate/Widget/test/TemplateTest.php | 31 ++++++++ api/src/Etemplate/test/WidgetBaseTest.php | 26 +++++++ api/src/test/EtemplateTest.php | 75 +++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 api/src/Etemplate/Widget/test/TemplateTest.php create mode 100644 api/src/Etemplate/test/WidgetBaseTest.php create mode 100644 api/src/test/EtemplateTest.php diff --git a/api/src/Etemplate/Widget/test/TemplateTest.php b/api/src/Etemplate/Widget/test/TemplateTest.php new file mode 100644 index 0000000000..2135674513 --- /dev/null +++ b/api/src/Etemplate/Widget/test/TemplateTest.php @@ -0,0 +1,31 @@ +markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +} diff --git a/api/src/Etemplate/test/WidgetBaseTest.php b/api/src/Etemplate/test/WidgetBaseTest.php new file mode 100644 index 0000000000..8d21fe4591 --- /dev/null +++ b/api/src/Etemplate/test/WidgetBaseTest.php @@ -0,0 +1,26 @@ +assertEquals(false, $etemplate->read('totally invalid'), 'Reading invalid template'); + + // Templates must be in the correct templates directory - use one from API + $this->assertEquals(true, $etemplate->read('api.prompt')); + } + + public function testSetDOMId() + { + + $etemplate = new Etemplate(); +/* + Etemplate::$response = $this->getMockBuilder(Etemplate\Api\Json\Response) + ->disableOriginalConstructor() + ->setMethods(['generic']) + ->getMock($etemplate); + Etemplate::$response->expects($this->once()) + ->method('generic'); + */ + $etemplate->set_dom_id('test_id'); + + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + public function testArrayMerge() + { + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + public function testExec() + { + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +}