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

Function TestMain

frankenphp_test.go:138–152  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

136}
137
138func TestMain(m *testing.M) {
139 flag.Parse()
140
141 if !testing.Verbose() {
142 slog.SetDefault(slog.New(slog.DiscardHandler))
143 }
144
145 // setup custom environment var for TestWorkerHasOSEnvironmentVariableInSERVER and TestPhpIni
146 if os.Setenv("CUSTOM_OS_ENV_VARIABLE", "custom_env_variable_value") != nil || os.Setenv("LITERAL_ZERO", "0") != nil {
147 fmt.Println("Failed to set environment variable for tests")
148 os.Exit(1)
149 }
150
151 os.Exit(m.Run())
152}
153
154func TestHelloWorld_module(t *testing.T) { testHelloWorld(t, nil) }
155func TestHelloWorld_worker(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ParseMethod · 0.80

Tested by

no test coverage detected