[#1143] Fix code examples in Writing Extensions' Testing Plugins section

This fixes #1143. I'm not sure if the style is compliant with what we want, though. @tobes?