MCPcopy Index your code
hub / github.com/php/frankenphp / TestStubGenerator_ErrorHandling

Function TestStubGenerator_ErrorHandling

internal/extgen/stub_test.go:334–346  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

332}
333
334func TestStubGenerator_ErrorHandling(t *testing.T) {
335 generator := &Generator{
336 BaseName: "test",
337 BuildDir: "/invalid/readonly/path",
338 Functions: []phpFunction{
339 {Name: "test", Signature: "test(): void"},
340 },
341 }
342
343 stubGen := StubGenerator{generator}
344 err := stubGen.generate()
345 assert.Error(t, err, "Expected error when writing to invalid directory")
346}
347
348func TestStubGenerator_EmptyContent(t *testing.T) {
349 generator := &Generator{

Callers

nothing calls this directly

Calls 2

generateMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected