From a856a50bc3fe75d96db846d99bcbf864f946fbbb Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 4 Jul 2016 20:21:14 +0200 Subject: [PATCH] addressing random unit test failures, resolves #106 --- tst/zerobin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tst/zerobin.php b/tst/zerobin.php index 27ca76c..22cb312 100644 --- a/tst/zerobin.php +++ b/tst/zerobin.php @@ -282,6 +282,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest'; $_SERVER['REQUEST_METHOD'] = 'POST'; $_SERVER['REMOTE_ADDR'] = '::1'; + $time = time(); ob_start(); new zerobin; $content = ob_get_contents(); @@ -294,7 +295,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase ); $this->assertTrue($this->_model->exists($response['id']), 'paste exists after posting data'); $paste = $this->_model->read($response['id']); - $this->assertEquals(time() + 300, $paste->meta->expire_date, 'time is set correctly'); + $this->assertEquals($time + 300, $paste->meta->expire_date, 'time is set correctly'); } /**