1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Updated toDate() test.

This commit is contained in:
Cameron
2018-03-04 15:30:46 -08:00
parent d657a29c6f
commit d5e5504d57

View File

@@ -151,13 +151,18 @@
$time = 1519512067; // Saturday 24 February 2018 - 22:41:07
$long = $class->toDate($time, 'long');
$this->assertContains('<span data-livestamp="1519512067">Saturday 24 February 2018',$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);
$this->assertContains('data-livestamp="1519512067"', $rel);
$custom = $class->toDate($time, 'dd-M-yy');
$this->assertContains('<span>24-Feb-18</span>', $custom);
}