MCPcopy
hub / github.com/caddyserver/caddy / assertPlaceholder

Function assertPlaceholder

modules/caddyhttp/caddyauth/caddyauth_test.go:171–180  ·  view source on GitHub ↗
(t *testing.T, repl *caddy.Replacer, key, expected string)

Source from the content-addressed store, hash-verified

169}
170
171func 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
182func assertPlaceholderAbsent(t *testing.T, repl *caddy.Replacer, key string) {
183 t.Helper()

Calls 1

GetStringMethod · 0.80

Tested by

no test coverage detected