From d657a29c6f144917f2ea2c1914c6bd95156cfb46 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 24 Feb 2018 15:18:58 -0800 Subject: [PATCH] Added e_parser unit test script. Test added for toDate() method. --- tests/unit/e_parserTest.php | 190 ++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 tests/unit/e_parserTest.php diff --git a/tests/unit/e_parserTest.php b/tests/unit/e_parserTest.php new file mode 100644 index 000000000..c1c25d503 --- /dev/null +++ b/tests/unit/e_parserTest.php @@ -0,0 +1,190 @@ +make('e_parser'); + } + catch (Exception $e) + { + $this->assertTrue(false, "Couldn't load e_parser object"); + } + + $time = 1519512067; // Saturday 24 February 2018 - 22:41:07 + + $long = $class->toDate($time, 'long'); + $this->assertContains('Saturday 24 February 2018',$long); + + $short = $class->toDate($time, 'short'); + $this->assertContains('Feb 2018', $short); + + $rel = $class->toDate($time, 'relative'); + $this->assertContains('ago', $rel); + + + } +/* + public function testParseBBTags() + { + + } + + public function testFilter() + { + + } + + public function testCleanHtml() + { + + } + + public function testSecureAttributeValue() + { + + } + + public function testInvalidAttributeValue() + { + + } +*/ + }