1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

date tests.

This commit is contained in:
camer0n 2023-11-13 09:01:41 -08:00
parent 9f673644df
commit 75eb350c69
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@
<testsuites>
<testsuite name="e107 v2.x Test Suite">
<directory>tests</directory>
<directory>../e107_plugins</directory>
</testsuite>
</testsuites>
<php>

View File

@ -437,7 +437,7 @@ class e_formTest extends \Codeception\Test\Unit
// 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);
@ -1144,7 +1144,7 @@ class e_formTest extends \Codeception\Test\Unit
'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',