(t *testing.T, content, baseName string)
| 320 | } |
| 321 | |
| 322 | func testCFileBasicStructure(t *testing.T, content, baseName string) { |
| 323 | requiredElements := []string{ |
| 324 | "#include <php.h>", |
| 325 | "#include <Zend/zend_API.h>", |
| 326 | `#include "_cgo_export.h"`, |
| 327 | `#include "` + baseName + `.h"`, |
| 328 | `#include "` + baseName + `_arginfo.h"`, |
| 329 | "PHP_MINIT_FUNCTION(" + baseName + ")", |
| 330 | baseName + "_module_entry", |
| 331 | } |
| 332 | |
| 333 | for _, element := range requiredElements { |
| 334 | assert.Contains(t, content, element, "C file should contain: %s", element) |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | func testCFileFunctions(t *testing.T, content string, functions []phpFunction) { |
| 339 | for _, fn := range functions { |
no outgoing calls
no test coverage detected