]> BookStack Code Mirror - bookstack/blob - tests/Meta/HelpTest.php
Lexical: Adjusted handling of child/sibling list items on nesting
[bookstack] / tests / Meta / HelpTest.php
1 <?php
2
3 namespace Tests\Meta;
4
5 use Tests\TestCase;
6
7 class HelpTest extends TestCase
8 {
9     public function test_wysiwyg_help_shows_tiny_and_tiny_license_link()
10     {
11         $resp = $this->get('/help/wysiwyg');
12         $resp->assertOk();
13         $this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/"]');
14         $this->withHtml($resp)->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
15     }
16
17     public function test_tiny_license_exists_where_expected()
18     {
19         $expectedPath = public_path('/libs/tinymce/license.txt');
20         $this->assertTrue(file_exists($expectedPath));
21
22         $contents = file_get_contents($expectedPath);
23         $this->assertStringContainsString('MIT License', $contents);
24     }
25 }