mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
wysiwyg test.
This commit is contained in:
@@ -121,8 +121,8 @@ class e_thumbnail
|
|||||||
|
|
||||||
private function parseRequest()
|
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
|
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'];
|
$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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -881,11 +881,14 @@ class e107Test extends \Codeception\Test\Unit
|
|||||||
|
|
||||||
public function testWysiwyg()
|
public function testWysiwyg()
|
||||||
{
|
{
|
||||||
|
e107::getConfig()->setPref('wysiwyg', true)->save();
|
||||||
|
$tinyMceInstalled = e107::isInstalled('tinymce4');
|
||||||
|
|
||||||
$tests = array(
|
$tests = array(
|
||||||
//input => expected
|
//input => expected
|
||||||
'default' => 'tinymce4',
|
'default' => ($tinyMceInstalled) ? 'tinymce4' : 'bbcode',
|
||||||
'bbcode' => 'bbcode',
|
'bbcode' => 'bbcode',
|
||||||
'tinymce4' => 'tinymce4'
|
'tinymce4' => ($tinyMceInstalled) ? 'tinymce4' : 'bbcode',
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($tests as $input => $expected)
|
foreach($tests as $input => $expected)
|
||||||
|
Reference in New Issue
Block a user