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

Function TestHeaderGenerator_MinimalContent

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

Source from the content-addressed store, hash-verified

255}
256
257func TestHeaderGenerator_MinimalContent(t *testing.T) {
258 generator := &Generator{BaseName: "minimal"}
259 headerGen := HeaderGenerator{generator}
260 content, err := headerGen.buildContent()
261 require.NoError(t, err)
262
263 essentialElements := []string{
264 "#ifndef _MINIMAL_H",
265 "#define _MINIMAL_H",
266 "#include <php.h>",
267 "extern zend_module_entry minimal_module_entry;",
268 "#endif",
269 }
270
271 for _, element := range essentialElements {
272 assert.Contains(t, content, element, "Minimal header should contain: %s", element)
273 }
274}
275
276func testHeaderBasicStructure(t *testing.T, content, baseName string) {
277 headerGuard := strings.Map(func(r rune) rune {

Callers

nothing calls this directly

Calls 1

buildContentMethod · 0.95

Tested by

no test coverage detected