Skip to content

Commit

Permalink
date tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Nov 13, 2023
1 parent 9f67364 commit 75eb350
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions e107_tests/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<testsuites>
<testsuite name="e107 v2.x Test Suite">
<directory>tests</directory>
<directory>../e107_plugins</directory>
</testsuite>
</testsuites>
<php>
Expand Down
4 changes: 2 additions & 2 deletions e107_tests/tests/unit/e_formTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public function testDatepicker()
// test timezone change...
date_default_timezone_set('America/Los_Angeles');
$actual = $this->_frm->datepicker('date_field',$time,'type=datetime&format=MM, dd, yyyy hh:ii');
$expected = "<input class='tbox e-datetime input-xlarge form-control' type='text' size='40' id='e-datepicker-date-field' value='December, 31, 2022 18:00' data-date-unix ='true' data-date-format='MM, dd, yyyy hh:ii' data-date-ampm='false' data-date-language='en' data-date-firstday='0' /><input type='hidden' name='date_field' id='date-field' value='1672534800' />";
$expected = "<input class='tbox e-datetime input-xlarge form-control' type='text' size='40' id='e-datepicker-date-field' value='December, 31, 2022 17:00' data-date-unix ='true' data-date-format='MM, dd, yyyy hh:ii' data-date-ampm='false' data-date-language='en' data-date-firstday='0' /><input type='hidden' name='date_field' id='date-field' value='1672534800' />";

$this->assertEquals($expected, $actual);
date_default_timezone_set($prevTimeZone);
Expand Down Expand Up @@ -1144,7 +1144,7 @@ public function testRenderValue()

'file_001' => '<a href="'.SITEURL.'e107_media/000000test/files/test.zip" title="Direct link to {e_MEDIA_FILE}test.zip" rel="external">{e_MEDIA_FILE}test.zip</a>',
'files_001' => '<ol><li>{e_MEDIA_FILE}test.zip</li></ol>',
'datestamp_001' => '03 Nov 2023 : 14:47',
'datestamp_001' => '03 Nov 2023 : 13:47',
'date_001' => '2018-08-23',
'userclass_001' => 'Everyone (public)',
'userclasses_001' => 'Everyone (public)<br />PRIVATEMENU',
Expand Down

0 comments on commit 75eb350

Please sign in to comment.