From 633191d80819d53cda0ebed177b07eaf009e276e Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 28 Sep 2013 15:20:10 +0200 Subject: [PATCH] Making sure scripts and tests check for GNUSOCIAL defined (instead of STATUSNET) Orbited plugin may not work at all anymore, I had no means to try it. But there's a check whether 'LACONICA' is defined there, which is a very unlikely thing in the future. So far only tests and scripts have been migrated consistently, though. --- plugins/OStatus/tests/FeedDiscoveryTest.php | 4 ++-- plugins/OStatus/tests/MagicEnvelopeTest.php | 3 ++- plugins/OStatus/tests/gettext-speedtest.php | 4 ++-- scripts/fixup_hashtags.php | 4 ++-- scripts/fixup_replies.php | 4 ++-- scripts/update_translations.php | 4 ++-- tests/ActivityGenerationTests.php | 3 ++- tests/ActivityParseTests.php | 3 ++- tests/CommandInterperterTest.php | 4 ++-- tests/CurryTest.php | 4 ++-- tests/HashTagDetectionTests.php | 4 ++-- tests/JidValidateTest.php | 4 ++-- tests/LocationTest.php | 3 ++- tests/MediaFileTest.php | 4 ++-- tests/NicknameTest.php | 4 ++-- tests/TagURITest.php | 3 ++- tests/URLDetectionTest.php | 4 ++-- tests/UUIDTest.php | 3 ++- tests/UserFeedParseTest.php | 3 ++- tests/UserRightsTest.php | 5 +++-- tests/oEmbedTest.php | 3 ++- 21 files changed, 43 insertions(+), 34 deletions(-) diff --git a/plugins/OStatus/tests/FeedDiscoveryTest.php b/plugins/OStatus/tests/FeedDiscoveryTest.php index ef17efe7cf..28ac549c89 100644 --- a/plugins/OStatus/tests/FeedDiscoveryTest.php +++ b/plugins/OStatus/tests/FeedDiscoveryTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; require_once INSTALLDIR . '/plugins/OStatus/lib/feeddiscovery.php'; diff --git a/plugins/OStatus/tests/MagicEnvelopeTest.php b/plugins/OStatus/tests/MagicEnvelopeTest.php index 5ee0362d28..abed4959f9 100644 --- a/plugins/OStatus/tests/MagicEnvelopeTest.php +++ b/plugins/OStatus/tests/MagicEnvelopeTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/plugins/OStatus/tests/gettext-speedtest.php b/plugins/OStatus/tests/gettext-speedtest.php index 01b678ab38..0584af8ef4 100644 --- a/plugins/OStatus/tests/gettext-speedtest.php +++ b/plugins/OStatus/tests/gettext-speedtest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/scripts/commandline.inc'; require_once INSTALLDIR . '/extlib/php-gettext/gettext.inc'; diff --git a/scripts/fixup_hashtags.php b/scripts/fixup_hashtags.php index 87bbecfb44..ac6522f3d9 100755 --- a/scripts/fixup_hashtags.php +++ b/scripts/fixup_hashtags.php @@ -25,8 +25,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); // compatibility +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once(INSTALLDIR . '/lib/common.php'); diff --git a/scripts/fixup_replies.php b/scripts/fixup_replies.php index dd55e6ed40..17d746eb51 100755 --- a/scripts/fixup_replies.php +++ b/scripts/fixup_replies.php @@ -25,8 +25,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); // compatibility +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once(INSTALLDIR . '/lib/common.php'); diff --git a/scripts/update_translations.php b/scripts/update_translations.php index 1fe513b13b..e204e747c8 100755 --- a/scripts/update_translations.php +++ b/scripts/update_translations.php @@ -25,8 +25,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); // compatibility +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once(INSTALLDIR . '/lib/common.php'); diff --git a/tests/ActivityGenerationTests.php b/tests/ActivityGenerationTests.php index 8e59050e75..af6535e734 100644 --- a/tests/ActivityGenerationTests.php +++ b/tests/ActivityGenerationTests.php @@ -8,7 +8,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { // XXX: we should probably have some common source for this stuff define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/ActivityParseTests.php b/tests/ActivityParseTests.php index 6423eaaf03..801cc22c26 100644 --- a/tests/ActivityParseTests.php +++ b/tests/ActivityParseTests.php @@ -8,7 +8,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { // XXX: we should probably have some common source for this stuff define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/CommandInterperterTest.php b/tests/CommandInterperterTest.php index 3ce1cc2821..c97bfb1652 100644 --- a/tests/CommandInterperterTest.php +++ b/tests/CommandInterperterTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/CurryTest.php b/tests/CurryTest.php index 37b66cc749..6e776e41b4 100644 --- a/tests/CurryTest.php +++ b/tests/CurryTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/HashTagDetectionTests.php b/tests/HashTagDetectionTests.php index 47031d5bc4..1fbc98983d 100644 --- a/tests/HashTagDetectionTests.php +++ b/tests/HashTagDetectionTests.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/JidValidateTest.php b/tests/JidValidateTest.php index 9f59011396..6c3eef0ed5 100644 --- a/tests/JidValidateTest.php +++ b/tests/JidValidateTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility mb_internal_encoding('UTF-8'); // @fixme this probably belongs in common.php? diff --git a/tests/LocationTest.php b/tests/LocationTest.php index 1badecb5db..a8447e1b48 100644 --- a/tests/LocationTest.php +++ b/tests/LocationTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/MediaFileTest.php b/tests/MediaFileTest.php index a76a4f45e6..b1891574e2 100644 --- a/tests/MediaFileTest.php +++ b/tests/MediaFileTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/NicknameTest.php b/tests/NicknameTest.php index 66e883c049..2841398a65 100644 --- a/tests/NicknameTest.php +++ b/tests/NicknameTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/TagURITest.php b/tests/TagURITest.php index d23f8bfe66..ccc80b8064 100644 --- a/tests/TagURITest.php +++ b/tests/TagURITest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index dc017ac616..95d01fb3a9 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); -define('LACONICA', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/UUIDTest.php b/tests/UUIDTest.php index e78d5ce1bc..ce330d7ac6 100644 --- a/tests/UUIDTest.php +++ b/tests/UUIDTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/UserFeedParseTest.php b/tests/UserFeedParseTest.php index 208e71be69..6306adb772 100644 --- a/tests/UserFeedParseTest.php +++ b/tests/UserFeedParseTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; diff --git a/tests/UserRightsTest.php b/tests/UserRightsTest.php index 97bf195749..bd9124a91d 100644 --- a/tests/UserRightsTest.php +++ b/tests/UserRightsTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php'; @@ -69,4 +70,4 @@ class UserRightsTest extends PHPUnit_Framework_TestCase $this->user->grantRole($role); $this->assertTrue($this->user->hasRole($role)); } -} \ No newline at end of file +} diff --git a/tests/oEmbedTest.php b/tests/oEmbedTest.php index 1f1d5f826c..50f3fd2919 100644 --- a/tests/oEmbedTest.php +++ b/tests/oEmbedTest.php @@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { } define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('STATUSNET', true); +define('GNUSOCIAL', true); +define('STATUSNET', true); // compatibility require_once INSTALLDIR . '/lib/common.php';