5.3 syntax...

This commit is contained in:
Robin Appelman 2014-08-31 13:16:28 +02:00
parent bfa0c4b78a
commit 3a85767182
1 changed files with 14 additions and 9 deletions

View File

@ -55,14 +55,19 @@ class CertificateTest extends \PHPUnit_Framework_TestCase {
}
function testGetIssueDate() {
$this->assertEquals((new DateTime('2014-08-27 08:45:52 GMT'))->getTimestamp(), $this->goodCertificate->getIssueDate()->getTimestamp());
$this->assertEquals((new DateTime('2014-08-27 08:48:51 GMT'))->getTimestamp(), $this->invalidCertificate->getIssueDate()->getTimestamp());
$expected = new DateTime('2014-08-27 08:45:52 GMT');
$this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getIssueDate()->getTimestamp());
$expected = new DateTime('2014-08-27 08:48:51 GMT');
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getIssueDate()->getTimestamp());
}
function testGetExpireDate() {
$this->assertEquals((new DateTime('2015-08-27 08:45:52 GMT'))->getTimestamp(), $this->goodCertificate->getExpireDate()->getTimestamp());
$this->assertEquals((new DateTime('2015-08-27 08:48:51 GMT'))->getTimestamp(), $this->invalidCertificate->getExpireDate()->getTimestamp());
$this->assertEquals((new DateTime('2014-08-28 09:12:43 GMT'))->getTimestamp(), $this->expiredCertificate->getExpireDate()->getTimestamp());
$expected = new DateTime('2015-08-27 08:45:52 GMT');
$this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getExpireDate()->getTimestamp());
$expected = new DateTime('2015-08-27 08:48:51 GMT');
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getExpireDate()->getTimestamp());
$expected = new DateTime('2014-08-28 09:12:43 GMT');
$this->assertEquals($expected->getTimestamp(), $this->expiredCertificate->getExpireDate()->getTimestamp());
}
/**