mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
* fix(test): use pg_trgm if not exists * test: add test for /core/importers * test: add test for gp-icon and theme screenshot download * test: inline most test assertion functions into assertExactJson * test: add hot tags tests * test: add plugin updates tests * test: 100% coverage of download routes * test: 100% coverage of plugin update controller * test: 100% coverage of all api controllers * fix: make PassThroughController drop unexpected requests * refactor: rm special case for / in PassThroughController * test: auto-fake facades * test: test PassThroughController for 100% coverage on Controllers * test: drop auto-fakes because facades are made of hate * zap: rm unused build-container-images action * test: add test for AssetCacheHit event * deps: composer upgrade and bump
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Testing\TestResponse;
|
|
|
|
function assertWpPluginAPIStructureForSearch(TestResponse $response): TestResponse
|
|
{
|
|
return $response->assertJsonStructure([
|
|
'info' => [
|
|
'page',
|
|
'pages',
|
|
'results',
|
|
],
|
|
'plugins' => [
|
|
'*' => [
|
|
'name',
|
|
'slug',
|
|
'version',
|
|
'author',
|
|
'author_profile',
|
|
'requires',
|
|
'tested',
|
|
'requires_php',
|
|
'rating',
|
|
'num_ratings',
|
|
'ratings' => [
|
|
'1',
|
|
'2',
|
|
'3',
|
|
'4',
|
|
'5',
|
|
],
|
|
'support_threads',
|
|
'support_threads_resolved',
|
|
'active_installs',
|
|
'downloaded',
|
|
'last_updated',
|
|
'added',
|
|
'homepage',
|
|
'download_link',
|
|
'tags',
|
|
'donate_link',
|
|
'short_description',
|
|
'description',
|
|
'icons' => [
|
|
'1x',
|
|
'2x',
|
|
],
|
|
'requires_plugins',
|
|
],
|
|
],
|
|
]);
|
|
}
|