Namespace error with fixture (solved)
I needed to define the namespace. In composer.json:
&quot;autoload&quot;: {
    &quot;psr-4&quot;: {
        &quot;myname\\tests\\fixtures&quot;: &quot;tests/fixtures&quot;
    }
}

and then
composer install

That uncovered some other problems with the above code (to anyone else who's trying to figure out fixtures, looking through the Craft repo's own tests directory is helpful), but that's separate from this question.