1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

wysiwyg test.

This commit is contained in:
Cameron
2020-12-13 07:40:41 -08:00
parent a8c79eda5b
commit 39691620ae
2 changed files with 7 additions and 6 deletions

View File

@@ -121,8 +121,8 @@ class e_thumbnail
private function parseRequest()
{
//echo 'e_query='.str_replace('&', '&', e_QUERY);
$e_QUERY = e_QUERY;
$e_QUERY = !empty($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : e_QUERY;
if(isset($_GET['id'])) // very-basic url-tampering prevention and path cloaking
{
@@ -139,9 +139,7 @@ class e_thumbnail
{
$this->_request['h'] = (int) $this->_request['h'];
}
// file_put_contents(e_LOG."thumbRequests.log", var_export($this->_request, true)."\n\n", FILE_APPEND);
// parse_str($_SERVER['QUERY_STRING'], $this->_request);
return $this;
}

View File

@@ -881,11 +881,14 @@ class e107Test extends \Codeception\Test\Unit
public function testWysiwyg()
{
e107::getConfig()->setPref('wysiwyg', true)->save();
$tinyMceInstalled = e107::isInstalled('tinymce4');
$tests = array(
//input => expected
'default' => 'tinymce4',
'default' => ($tinyMceInstalled) ? 'tinymce4' : 'bbcode',
'bbcode' => 'bbcode',
'tinymce4' => 'tinymce4'
'tinymce4' => ($tinyMceInstalled) ? 'tinymce4' : 'bbcode',
);
foreach($tests as $input => $expected)