]> BookStack Code Mirror - bookstack/blob - tests/HelpTest.php
Merge branch 'tinymce' into development
[bookstack] / tests / HelpTest.php
1 <?php
2
3 namespace Tests;
4
5 class HelpTest extends TestCase
6 {
7
8     public function test_wysiwyg_help_shows_tiny_and_tiny_license_link()
9     {
10         $resp = $this->get('/help/wysiwyg');
11         $resp->assertOk();
12         $resp->assertElementExists('a[href="https://www.tiny.cloud/"]');
13         $resp->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
14     }
15
16     public function test_tiny_license_exists_where_expected()
17     {
18         $expectedPath = public_path('/libs/tinymce/license.txt');
19         $this->assertTrue(file_exists($expectedPath));
20
21         $contents = file_get_contents($expectedPath);
22         $this->assertStringContainsString('GNU LESSER GENERAL PUBLIC LICENSE', $contents);
23     }
24
25 }