MCPcopy Create free account
hub / github.com/php/frankenphp / TestHeaderGenerator_Generate

Function TestHeaderGenerator_Generate

internal/extgen/hfile_test.go:12–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestHeaderGenerator_Generate(t *testing.T) {
13 tmpDir := t.TempDir()
14
15 generator := &Generator{
16 BaseName: "test_extension",
17 BuildDir: tmpDir,
18 }
19
20 headerGen := HeaderGenerator{generator}
21 require.NoError(t, headerGen.generate())
22
23 expectedFile := filepath.Join(tmpDir, "test_extension.h")
24 require.FileExists(t, expectedFile)
25
26 content, err := readFile(expectedFile)
27 require.NoError(t, err)
28
29 testHeaderBasicStructure(t, content, "test_extension")
30 testHeaderIncludeGuards(t, content, "TEST_EXTENSION_H")
31}
32
33func TestHeaderGenerator_BuildContent(t *testing.T) {
34 tests := []struct {

Callers

nothing calls this directly

Calls 4

generateMethod · 0.95
readFileFunction · 0.85
testHeaderBasicStructureFunction · 0.85
testHeaderIncludeGuardsFunction · 0.85

Tested by

no test coverage detected