mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added help/about box to wysiwyg editor
- To display license info along with shortcuts. - Extracted out plain layout from 503 error page. - Added tests to ensure license references are as expected.
This commit is contained in:
25
tests/HelpTest.php
Normal file
25
tests/HelpTest.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
class HelpTest extends TestCase
|
||||
{
|
||||
|
||||
public function test_wysiwyg_help_shows_tiny_and_tiny_license_link()
|
||||
{
|
||||
$resp = $this->get('/help/wysiwyg');
|
||||
$resp->assertOk();
|
||||
$resp->assertElementExists('a[href="https://www.tiny.cloud/"]');
|
||||
$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('GNU LESSER GENERAL PUBLIC LICENSE', $contents);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user