diff --git a/tests/unit/e_fileTest.php b/tests/unit/e_fileTest.php index 97d36ad2e..ae80f8aac 100644 --- a/tests/unit/e_fileTest.php +++ b/tests/unit/e_fileTest.php @@ -63,14 +63,14 @@ $actual = $this->fl->getAllowedFileTypes(); $expected = array ( - 'zip' => 2048, - 'gz' => 2048, - 'jpg' => 2048, - 'jpeg' => 2048, - 'png' => 2048, - 'gif' => 2048, - 'xml' => 2048, - 'pdf' => 2048, + 'zip' => 2097152, // 2M in bytes + 'gz' => 2097152, + 'jpg' => 2097152, + 'jpeg' => 2097152, + 'png' => 2097152, + 'gif' => 2097152, + 'xml' => 2097152, + 'pdf' => 2097152, ); $this->assertEquals($expected,$actual); diff --git a/tests/unit/plugins/e107TinyMceParserTest.php b/tests/unit/plugins/e107TinyMceParserTest.php new file mode 100644 index 000000000..b76518911 --- /dev/null +++ b/tests/unit/plugins/e107TinyMceParserTest.php @@ -0,0 +1,87 @@ +tm = $this->make('e107TinyMceParser'); + } + catch (Exception $e) + { + $this->fail("Couldn't load e107TinyMceParser object"); + } + } + + + + + public function testToHtml() + { + + } + + public function testToBBcode() + { + + $test_1 = '
+2 +'; + + $actual_1 = $this->tm->toBBcode($test_1); + $expected_1 = '[html] +2[/html]'; + + // echo $actual; + + $this->assertEquals($expected_1, $actual_1); + + + + $test_2 = + 'Some text
Some other text
[img class=bbcode-img-right&width=300]{e_MEDIA_IMAGE}2017-11/e107_about.png[/img]Some text
+[img class=bbcode-img-left&width=600]{e_MEDIA_IMAGE}2017-11/e107_about.png[/img]Some other text
[/html]'; + + $this->assertEquals($expected_2, $actual_2); + + + + + + + } + }