]> BookStack Code Mirror - bookstack/blob - tests/HelpTest.php
Applied StyleCI changes
[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         $resp->assertElementExists('a[href="https://www.tiny.cloud/"]');
12         $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('GNU LESSER GENERAL PUBLIC LICENSE', $contents);
22     }
23 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.