post()) do not seem to get passed the tester's locale, but instead fallback to the default locale. * * So we set the pages locale to be the default locale, which will then match any subsequent requests. * * If creating pages in your unit tests (rather than reading from the fixtures file), you must explicitly call * self::compat() on the page, for the same reasons as above. */ if (class_exists(Translatable::class)) { $this->translatableEnabledBefore = SiteTree::has_extension(Translatable::class); SiteTree::remove_extension(Translatable::class); } } protected function tearDown() { if (class_exists(Translatable::class)) { if ($this->translatableEnabledBefore) { SiteTree::add_extension(Translatable::class); } } parent::tearDown(); } }