From f772b30301ff95e6eaca3d0265bf6e80674360a0 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 7 Nov 2018 12:15:51 +0000 Subject: [PATCH] fix some tests --- ext/index/test.php | 2 +- ext/pools/theme.php | 2 +- ext/rule34/main.php | 2 ++ tests/phpunit.xml | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/index/test.php b/ext/index/test.php index 682fb1cc..111c6161 100644 --- a/ext/index/test.php +++ b/ext/index/test.php @@ -15,7 +15,7 @@ class IndexTest extends ShimmiePHPUnitTestCase { public function testIndexPage() { $this->get_page('post/list'); - $this->assert_title("Welcome to Shimmie ".VERSION); + $this->assert_title("Welcome to Shimmie"); $this->assert_no_text("Prev | Index | Next"); $this->log_in_as_user(); diff --git a/ext/pools/theme.php b/ext/pools/theme.php index 2a96436c..85bc5dbd 100644 --- a/ext/pools/theme.php +++ b/ext/pools/theme.php @@ -140,7 +140,7 @@ class PoolsTheme extends Themelet { $page->add_block(new NavBlock()); $page->add_block(new Block("Pool Navigation", $poolnav_html, "left", 10)); - if(count($pools) == 1) { + if(!is_null($pools) && count($pools) == 1) { $pool = $pools[0]; if($pool['public'] == "Y" || $user->is_admin()) {// IF THE POOL IS PUBLIC OR IS ADMIN SHOW EDIT PANEL if(!$user->is_anonymous()) {// IF THE USER IS REGISTERED AND LOGGED IN SHOW EDIT PANEL diff --git a/ext/rule34/main.php b/ext/rule34/main.php index 7a6fc24e..b6881ecb 100644 --- a/ext/rule34/main.php +++ b/ext/rule34/main.php @@ -16,6 +16,8 @@ if( // kill these glitched requests immediately ) {die("No");} class Rule34 extends Extension { + protected $db_support = ['pgsql']; # Only PG has the NOTIFY pubsub system + public function onImageDeletion(ImageDeletionEvent $event) { global $database; $database->execute("NOTIFY shm_image_bans, '{$event->image->hash}';"); diff --git a/tests/phpunit.xml b/tests/phpunit.xml index e972774b..9b86d9f4 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -9,9 +9,9 @@ - core - ext - themes/default + ../core + ../ext + ../themes/default