From 270d1aeb41eec8ec41ec3931c4513ef061ec434e Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 17 Jan 2021 22:08:08 +0000 Subject: [PATCH] Improve the test data --- tests/Util/Database/StaticDatabase.php | 1 - tests/datasets/api.fixture.php | 54 ++++++++++++++++++++------ tests/datasets/config/A.config.php | 1 - tests/datasets/config/B.config.php | 1 - 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/tests/Util/Database/StaticDatabase.php b/tests/Util/Database/StaticDatabase.php index c6488fc483..14cbf13c11 100644 --- a/tests/Util/Database/StaticDatabase.php +++ b/tests/Util/Database/StaticDatabase.php @@ -58,7 +58,6 @@ class StaticDatabase extends Database $this->connection = self::$staticConnection; $this->connected = true; $this->emulate_prepares = false; - $this->pdo_emulate_prepares = false; return $this->connected; } diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index f8c696c877..95c427d7c9 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -179,6 +179,48 @@ return [ 'guid' => '6', ], ], + 'item-content' => [ + 'id' => 1, + 'uri-id' => 1, + 'uri-plink-hash' => '1', + 'body' => 'Parent status', + 'plink' => 'http://localhost/display/1', + ], + 'item-content' => [ + 'id' => 2, + 'uri-id' => 2, + 'uri-plink-hash' => '2', + 'body' => 'Reply', + 'plink' => 'http://localhost/display/2', + ], + 'item-content' => [ + 'id' => 3, + 'uri-id' => 3, + 'uri-plink-hash' => '3', + 'body' => 'Other user status', + 'plink' => 'http://localhost/display/3', + ], + 'item-content' => [ + 'id' => 4, + 'uri-id' => 4, + 'uri-plink-hash' => '4', + 'body' => 'Friend user reply', + 'plink' => 'http://localhost/display/4', + ], + 'item-content' => [ + 'id' => 5, + 'uri-id' => 5, + 'uri-plink-hash' => '5', + 'body' => '[share]Shared status[/share]', + 'plink' => 'http://localhost/display/5', + ], + 'item-content' => [ + 'id' => 6, + 'uri-id' => 6, + 'uri-plink-hash' => '6', + 'body' => 'Friend user status', + 'plink' => 'http://localhost/display/6', + ], 'item' => [ [ 'id' => 1, @@ -191,7 +233,6 @@ return [ 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 1, - 'body' => 'Parent status', 'parent' => 1, 'parent-uri-id' => 1, 'thr-parent-id' => 1, @@ -205,7 +246,6 @@ return [ 'deny_cid' => '', 'deny_gid' => '', 'guid' => '1', - 'plink' => 'http://localhost/display/1', ], [ 'id' => 2, @@ -218,7 +258,6 @@ return [ 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, - 'body' => 'Reply', 'parent' => 1, 'parent-uri-id' => 1, 'thr-parent-id' => 1, @@ -228,8 +267,6 @@ return [ 'starred' => 0, 'origin' => 1, 'guid' => '2', - 'plink' => 'http://localhost/display/2', - ], [ 'id' => 3, @@ -242,7 +279,6 @@ return [ 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, - 'body' => 'Other user status', 'parent' => 3, 'parent-uri-id' => 3, 'thr-parent-id' => 3, @@ -252,7 +288,6 @@ return [ 'starred' => 0, 'origin' => 1, 'guid' => '3', - 'plink' => 'http://localhost/display/3', ], [ 'id' => 4, @@ -275,7 +310,6 @@ return [ 'starred' => 0, 'origin' => 1, 'guid' => '4', - 'plink' => 'http://localhost/display/4', ], [ @@ -289,7 +323,6 @@ return [ 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, - 'body' => '[share]Shared status[/share]', 'parent' => 1, 'parent-uri-id' => 1, 'thr-parent-id' => 1, @@ -303,7 +336,6 @@ return [ 'deny_cid' => '', 'deny_gid' => '', 'guid' => '5', - 'plink' => 'http://localhost/display/5', ], [ 'id' => 6, @@ -316,7 +348,6 @@ return [ 'uid' => 42, 'verb' => 'http://activitystrea.ms/schema/1.0/post', 'unseen' => 0, - 'body' => 'Friend user status', 'parent' => 6, 'parent-uri-id' => 6, 'thr-parent-id' => 6, @@ -326,7 +357,6 @@ return [ 'starred' => 0, 'origin' => 1, 'guid' => '6', - 'plink' => 'http://localhost/display/6', ], ], 'notify' => [ diff --git a/tests/datasets/config/A.config.php b/tests/datasets/config/A.config.php index 081f367c2c..f28e1f2e85 100644 --- a/tests/datasets/config/A.config.php +++ b/tests/datasets/config/A.config.php @@ -12,7 +12,6 @@ return [ 'password' => 'testpw', 'database' => 'testdb', 'charset' => 'utf8mb4', - 'pdo_emulate_prepares' => false, ], 'config' => [ diff --git a/tests/datasets/config/B.config.php b/tests/datasets/config/B.config.php index 1a06975411..59fadcf55e 100644 --- a/tests/datasets/config/B.config.php +++ b/tests/datasets/config/B.config.php @@ -12,7 +12,6 @@ return [ 'password' => 'testpw', 'database' => 'testdb', 'charset' => 'utf8mb4', - 'pdo_emulate_prepares' => false, ], 'config' => [