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

Function TestCFileErrorHandling

internal/extgen/cfile_test.go:278–291  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

276}
277
278func TestCFileErrorHandling(t *testing.T) {
279 // Test with invalid build directory
280 generator := &Generator{
281 BaseName: "test",
282 BuildDir: "/invalid/readonly/path",
283 Functions: []phpFunction{
284 {Name: "test", ReturnType: phpVoid},
285 },
286 }
287
288 cGen := cFileGenerator{generator}
289 err := cGen.generate()
290 assert.Error(t, err, "Expected error when writing to invalid directory")
291}
292
293func TestCFileSpecialCharacters(t *testing.T) {
294 tests := []struct {

Callers

nothing calls this directly

Calls 2

generateMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected