MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / php_vendor_graph_ok

Function php_vendor_graph_ok

tests/test_parallel.c:5044–5069  ·  view source on GitHub ↗

1 when the graph holds no vendor-named edge and every control edge. */

Source from the content-addressed store, hash-verified

5042
5043/* 1 when the graph holds no vendor-named edge and every control edge. */
5044static int php_vendor_graph_ok(const cbm_gbuf_t *gbuf, const char *driver) {
5045 static const char *const foo = "lib/Integrations/Foo.php";
5046 static const char *const req = "lib/Requests/Request.php";
5047 static const char *const svc = "lib/Services/Svc.php";
5048 struct {
5049 const char *type;
5050 const char *tgt;
5051 int want_min;
5052 int want_max;
5053 } checks[] = {
5054 {"INHERITS", req, 0, 0}, {"CALLS", req, 0, 0}, {"USAGE", req, 0, 0},
5055 {"CALLS", "web/api.ts", 0, 0}, {"INHERITS", svc, 1, 1}, {"CALLS", svc, 2, 2},
5056 {"CALLS", foo, 0, 0}, {"USAGE", svc, 1, 1 << 20},
5057 };
5058 int ok = 1;
5059 for (size_t i = 0; i < sizeof(checks) / sizeof(checks[0]); i++) {
5060 int got = php_file_edges(gbuf, checks[i].type, foo, checks[i].tgt);
5061 if (got < checks[i].want_min || got > checks[i].want_max) {
5062 printf(" [%s] %s Foo.php -> %s: got %d, want %d..%d\n", driver, checks[i].type,
5063 checks[i].tgt, got, checks[i].want_min, checks[i].want_max);
5064 ok = 0;
5065 }
5066 }
5067 return ok && php_vendor_service_edge(gbuf, "HTTP_CALLS", "/api/vendor-health") &&
5068 php_vendor_service_edge(gbuf, "ASYNC_CALLS", "vendor-orders");
5069}
5070
5071TEST(parallel_php_vendor_types_never_bind_by_name_issue1186) {
5072 ASSERT_TRUE(php_vendor_extracted_sites());

Callers 1

test_parallel.cFile · 0.85

Calls 2

php_file_edgesFunction · 0.85
php_vendor_service_edgeFunction · 0.85

Tested by

no test coverage detected