2022-02-07 23:19:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
2024-09-30 17:07:53 +01:00
|
|
|
namespace Tests\Meta;
|
|
|
|
|
|
|
|
|
|
use Tests\TestCase;
|
2022-02-07 23:19:04 +00:00
|
|
|
|
|
|
|
|
class HelpTest extends TestCase
|
|
|
|
|
{
|
2024-12-17 22:40:28 +00:00
|
|
|
public function test_tinymce_help_shows_tiny_and_tiny_license_link()
|
2022-02-07 23:19:04 +00:00
|
|
|
{
|
2024-12-17 22:40:28 +00:00
|
|
|
$resp = $this->get('/help/tinymce');
|
2022-02-07 23:19:04 +00:00
|
|
|
$resp->assertOk();
|
2022-07-23 15:10:18 +01:00
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/"]');
|
|
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="' . url('/libs/tinymce/license.txt') . '"]');
|
2022-02-07 23:19:04 +00: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 12:08:55 +01:00
|
|
|
$this->assertStringContainsString('MIT License', $contents);
|
2022-02-07 23:19:04 +00:00
|
|
|
}
|
2024-12-17 22:40:28 +00:00
|
|
|
|
|
|
|
|
public function test_wysiwyg_help_shows_lexical_and_licenses_link()
|
|
|
|
|
{
|
|
|
|
|
$resp = $this->get('/help/wysiwyg');
|
|
|
|
|
$resp->assertOk();
|
|
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="https://lexical.dev/"]');
|
|
|
|
|
$this->withHtml($resp)->assertElementExists('a[href="' . url('/licenses') . '"]');
|
|
|
|
|
}
|
2022-02-07 23:19:04 +00:00
|
|
|
}
|