(t *testing.T, xmlStr, path string)
| 10 | ) |
| 11 | |
| 12 | func mustFindElement(t *testing.T, xmlStr, path string) *etree.Element { |
| 13 | t.Helper() |
| 14 | doc := etree.NewDocument() |
| 15 | assert.Check(t, doc.ReadFromString(xmlStr)) |
| 16 | el := doc.FindElement(path) |
| 17 | assert.Assert(t, el != nil, "cannot find %s", path) |
| 18 | return el |
| 19 | } |
| 20 | |
| 21 | // The serialized element must be well-formed XML on its own: every prefix |
| 22 | // it uses has to be declared, and the default namespace must be written as |
no outgoing calls
no test coverage detected