MCPcopy Create free account
hub / github.com/error311/FileRise / testById

Method testById

src/FileRise/Domain/SourceAdminService.php:76–90  ·  view source on GitHub ↗

* Execute a source health check for one source id. * * @return array */

(string $id)

Source from the content-addressed store, hash-verified

74 * @return array<string,mixed>
75 */
76 public static function testById(string $id): array
77 {
78 $id = trim($id);
79 if ($id === '') {
80 throw new RuntimeException('Missing source id', 400);
81 }
82
83 $source = SourcesConfig::getSource($id);
84 if (!$source) {
85 throw new RuntimeException('Source not found', 404);
86 }
87
88 $result = SourceHealth::check($source);
89 return self::normalizeHealthResult($result, 'Test did not return a result');
90 }
91
92 /**
93 * @param array<string,mixed>|null $resultSource

Callers 1

testSourceMethod · 0.80

Calls 3

normalizeHealthResultMethod · 0.95
getSourceMethod · 0.80
checkMethod · 0.80

Tested by

no test coverage detected