(t *testing.T)
| 255 | } |
| 256 | |
| 257 | func 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 | |
| 276 | func testHeaderBasicStructure(t *testing.T, content, baseName string) { |
| 277 | headerGuard := strings.Map(func(r rune) rune { |
nothing calls this directly
no test coverage detected