(t *testing.T, repl *caddy.Replacer, key, expected string)
| 169 | } |
| 170 | |
| 171 | func assertPlaceholder(t *testing.T, repl *caddy.Replacer, key, expected string) { |
| 172 | t.Helper() |
| 173 | actual, ok := repl.GetString(key) |
| 174 | if !ok { |
| 175 | t.Fatalf("expected placeholder %q to be set", key) |
| 176 | } |
| 177 | if actual != expected { |
| 178 | t.Fatalf("expected placeholder %q to be %q, got %q", key, expected, actual) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | func assertPlaceholderAbsent(t *testing.T, repl *caddy.Replacer, key string) { |
| 183 | t.Helper() |
no test coverage detected