| 136 | } |
| 137 | |
| 138 | func 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 | |
| 154 | func TestHelloWorld_module(t *testing.T) { testHelloWorld(t, nil) } |
| 155 | func TestHelloWorld_worker(t *testing.T) { |