From a570ef4691dda8f7abbe52284048652fe71d083a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 26 Oct 2025 19:19:36 +0100 Subject: [PATCH] add test for ASCache::isCacheable() --- tests/unit/Lib/ASCacheTest.php | 46 ++++++++++++++++++++++++++++++++++ vendor/composer/installed.php | 12 ++++----- 2 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 tests/unit/Lib/ASCacheTest.php diff --git a/tests/unit/Lib/ASCacheTest.php b/tests/unit/Lib/ASCacheTest.php new file mode 100644 index 000000000..47a377d45 --- /dev/null +++ b/tests/unit/Lib/ASCacheTest.php @@ -0,0 +1,46 @@ +assertSame($expected, $result); + } + + public static function isCacheableProvider(): array + { + return [ + 'to field as:public' => [ + ['to' => [ACTIVITY_PUBLIC_INBOX]], + true + ], + 'cc field as:public' => [ + ['to' => ['https://example.com/channel/test'], 'cc' => [ACTIVITY_PUBLIC_INBOX]], + true + ], + 'fields are strings' => [ + ['to' => 'https://example.com/channel/test', 'cc' => ACTIVITY_PUBLIC_INBOX], + true + ], + 'none as:public' => [ + ['to' => ['https://example.com/channel/test'], 'cc' => ['https://example.com/channel/test/followers']], + false + ], + 'no addressing' => [ + ['type' => ['Person'], 'url' => ['https://example.com/channel/test']], + true + ], + ]; + } + +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index fbf577496..97da1abd1 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'zotlabs/hubzilla', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'b50aa43542cb0cd8481f35a026d46b09750c7403', + 'pretty_version' => 'dev-10.6RC', + 'version' => 'dev-10.6RC', + 'reference' => '7cf7aa397e26ebad0262b6ce5e4c46895de16d78', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -542,9 +542,9 @@ 'dev_requirement' => false, ), 'zotlabs/hubzilla' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'b50aa43542cb0cd8481f35a026d46b09750c7403', + 'pretty_version' => 'dev-10.6RC', + 'version' => 'dev-10.6RC', + 'reference' => '7cf7aa397e26ebad0262b6ce5e4c46895de16d78', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),