addressing random unit test failures, resolves #106

This commit is contained in:
El RIDO 2016-07-04 20:21:14 +02:00
parent 2a5c8b16e8
commit a856a50bc3
1 changed files with 2 additions and 1 deletions

View File

@ -282,6 +282,7 @@ class zerobinTest extends PHPUnit_Framework_TestCase
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest'; $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
$_SERVER['REQUEST_METHOD'] = 'POST'; $_SERVER['REQUEST_METHOD'] = 'POST';
$_SERVER['REMOTE_ADDR'] = '::1'; $_SERVER['REMOTE_ADDR'] = '::1';
$time = time();
ob_start(); ob_start();
new zerobin; new zerobin;
$content = ob_get_contents(); $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'); $this->assertTrue($this->_model->exists($response['id']), 'paste exists after posting data');
$paste = $this->_model->read($response['id']); $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');
} }
/** /**