1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Tests: Categorised up meta tests

Extracted robots.txt tests into its own file to fit into new folder.
Also tweaked open search tests a tad to specifically check long app
names.
This commit is contained in:
Dan Brown
2024-09-30 17:07:53 +01:00
parent 2f74cfb42c
commit 514db60617
7 changed files with 53 additions and 38 deletions

25
tests/Meta/HelpTest.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace Tests\Meta;
use Tests\TestCase;
class HelpTest extends TestCase
{
public function test_wysiwyg_help_shows_tiny_and_tiny_license_link()
{
$resp = $this->get('/help/wysiwyg');
$resp->assertOk();
$this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/"]');
$this->withHtml($resp)->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
}
public function test_tiny_license_exists_where_expected()
{
$expectedPath = public_path('/libs/tinymce/license.txt');
$this->assertTrue(file_exists($expectedPath));
$contents = file_get_contents($expectedPath);
$this->assertStringContainsString('MIT License', $contents);
}
}