From 6b0b814dc643b9902082784ae09174f5b3d1cc70 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Wed, 6 Jul 2016 09:41:07 +0200 Subject: [PATCH] removing leftover from previously using a different function, resolves #83 --- lib/zerobin/db.php | 2 +- tst/zerobin.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zerobin/db.php b/lib/zerobin/db.php index 4475bfe..7171bc5 100644 --- a/lib/zerobin/db.php +++ b/lib/zerobin/db.php @@ -607,7 +607,7 @@ class zerobin_db extends zerobin_abstract case '0.21': // create the meta column if necessary (pre 0.21 change) try { - self::$_db->exec('SELECT meta FROM ' . self::$_prefix . 'paste LIMIT 1;', array()); + self::$_db->exec('SELECT meta FROM ' . self::$_prefix . 'paste LIMIT 1;'); } catch (PDOException $e) { self::$_db->exec('ALTER TABLE ' . self::$_prefix . 'paste ADD COLUMN meta TEXT;'); } diff --git a/tst/zerobin.php b/tst/zerobin.php index 1c9d0da..dc404a5 100644 --- a/tst/zerobin.php +++ b/tst/zerobin.php @@ -295,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->assertGreaterThanOrEqual($time + 300, $paste->meta->expire_date, 'time is set correctly'); } /** @@ -327,8 +327,8 @@ 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(1, $paste->meta->opendiscussion, 'time is set correctly'); + $this->assertGreaterThanOrEqual($time + 300, $paste->meta->expire_date, 'time is set correctly'); + $this->assertEquals(1, $paste->meta->opendiscussion, 'discussion is enabled'); } /**