Zonema...Example(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

πŸ’– Zonemaster::Test::Example β€” the vibe ✨

okay bestie, so this is Zonemaster::Test::Example, and it lives in the User Contributed Perl Documentation (that's the 3pm section, iykyk πŸŽ€). It's an example module showing the expected structure of Zonemaster test modules β€” like, it's literally the blueprint, the template, the "here's how your test module should look" moment πŸ‘‘


🌸 NAME 🌸

Zonemaster::Test::Example β€” an example module showing the expected structure of Zonemaster test modules πŸ’…


✨ SYNOPSIS ✨

my @results = Zonemaster::Test::Example->all($zone);

that's it, that's the whole entry point, and it's giving effortless πŸ¦‹


🫢 METHODS 🫢

  • all($zone) β€” runs the default set of tests and hands you back a list of log entries made by the tests. like, the whole suite, one call, no cap πŸ“‹βœ¨
  • metadata() β€” returns a reference to a hash. the keys are the names of all the test methods in the module, and each value is a reference to a list holding all the tags that method can use in log entries. so basically a little map of "who are you and what can you say" πŸ—ΊοΈ
  • translation() β€” returns a reference to a nested hash. outermost keys are language codes, the keys below that are message tags, and their values are translation strings. multilingual queen behavior πŸŒπŸ’œ
  • policy() β€” returns a reference to a hash with the default policy for the module. keys are message tags, and the values are their default log levels. the rules, bestie, the rules βš–οΈ
  • version() β€” returns a version string for the module. short, sweet, iconic 🏷️

🧚 TESTS 🧚

  • placeholder($zone) β€” since this is an example module, this test does nothing except return a single log entry. it's the little ghost of a test, haunting the file for structural reasons πŸ‘» (not me being a test that doesn't test anything… honestly? relatable.)

heads up bestie: this module is a structure example, so don't go expecting placeholder to actually validate a zone. it returns one log entry, that's its whole personality πŸŽ€

and that's the tea β˜• β€” this page is from perl v5.32.0, dated 2021-01-06, and it's filed under the Zonemaster::Test::Example(3pm) header. go build something slay with it πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from