2022-02-08 07:19:04 +08:00
|
|
|
<?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();
|
2022-07-23 22:10:18 +08:00
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/"]');
|
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
|
2022-02-08 07:19:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
2022-07-23 19:08:55 +08:00
|
|
|
$this->assertStringContainsString('MIT License', $contents);
|
2022-02-08 07:19:04 +08:00
|
|
|
}
|
|
|
|
}
|