+ public function test_base_body_start_and_end_template_files_can_be_used()
+ {
+ $bodyStartStr = 'barry-fought-against-the-panther';
+ $bodyEndStr = 'barry-lost-his-fight-with-grace';
+
+ $this->usingThemeFolder(function (string $folder) use ($bodyStartStr, $bodyEndStr) {
+ $viewDir = theme_path('layouts/parts');
+ mkdir($viewDir, 0777, true);
+ file_put_contents($viewDir . '/base-body-start.blade.php', $bodyStartStr);
+ file_put_contents($viewDir . '/base-body-end.blade.php', $bodyEndStr);
+
+ $resp = $this->asEditor()->get('/');
+ $resp->assertSee($bodyStartStr);
+ $resp->assertSee($bodyEndStr);
+ });
+ }
+
+ public function test_export_body_start_and_end_template_files_can_be_used()
+ {
+ $bodyStartStr = 'garry-fought-against-the-panther';
+ $bodyEndStr = 'garry-lost-his-fight-with-grace';
+ $page = $this->entities->page();
+
+ $this->usingThemeFolder(function (string $folder) use ($bodyStartStr, $bodyEndStr, $page) {
+ $viewDir = theme_path('layouts/parts');
+ mkdir($viewDir, 0777, true);
+ file_put_contents($viewDir . '/export-body-start.blade.php', $bodyStartStr);
+ file_put_contents($viewDir . '/export-body-end.blade.php', $bodyEndStr);
+
+ $resp = $this->asEditor()->get($page->getUrl('/export/html'));
+ $resp->assertSee($bodyStartStr);
+ $resp->assertSee($bodyEndStr);
+ });
+ }
+
+ public function test_login_and_register_message_template_files_can_be_used()
+ {
+ $loginMessage = 'Welcome to this instance, login below you scallywag';
+ $registerMessage = 'You want to register? Enter the deets below you numpty';
+
+ $this->usingThemeFolder(function (string $folder) use ($loginMessage, $registerMessage) {
+ $viewDir = theme_path('auth/parts');
+ mkdir($viewDir, 0777, true);
+ file_put_contents($viewDir . '/login-message.blade.php', $loginMessage);
+ file_put_contents($viewDir . '/register-message.blade.php', $registerMessage);
+ $this->setSettings(['registration-enabled' => 'true']);
+
+ $this->get('/login')->assertSee($loginMessage);
+ $this->get('/register')->assertSee($registerMessage);
+ });
+ }
+