]> BookStack Code Mirror - bookstack/blob - tests/HelpTest.php
Added md editor ui dropdown options & their back-end storage
[bookstack] / tests / HelpTest.php
1 <?php
2
3 namespace Tests;
4
5 class HelpTest extends TestCase
6 {
7     public function test_wysiwyg_help_shows_tiny_and_tiny_license_link()
8     {
9         $resp = $this->get('/help/wysiwyg');
10         $resp->assertOk();
11         $this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/"]');
12         $this->withHtml($resp)->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
13     }
14
15     public function test_tiny_license_exists_where_expected()
16     {
17         $expectedPath = public_path('/libs/tinymce/license.txt');
18         $this->assertTrue(file_exists($expectedPath));
19
20         $contents = file_get_contents($expectedPath);
21         $this->assertStringContainsString('MIT License', $contents);
22     }
23 }