Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/monara/public_html/test.athavaneng.com/themes.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
. /** * Unit test for the filter_algebra * * @package filter_algebra * @category phpunit * @copyright 2012 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace filter_algebra; use filter_algebra; defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/filter/algebra/filter.php'); /** * Unit tests for filter_algebra. * * Note that this only tests some of the filter logic. It does not actually test * the normal case of the filter working, because I cannot make it work on my * test server, and if it does not work here, it probably does not also work * for other people. A failing test will be irritating noise. * * @copyright 2012 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class filter_test extends \basic_testcase { protected $filter; protected function setUp(): void { parent::setUp(); $this->filter = new filter_algebra(\context_system::instance(), array()); } function test_algebra_filter_no_algebra() { $this->assertEquals('

Look no algebra!

', $this->filter->filter('

Look no algebra!

')); } function test_algebra_filter_pluginfile() { $this->assertEquals('', $this->filter->filter('')); } function test_algebra_filter_draftfile() { $this->assertEquals('', $this->filter->filter('')); } function test_algebra_filter_unified_diff() { $diff = ' diff -u -r1.1 Worksheet.php --- Worksheet.php 26 Sep 2003 04:18:02 -0000 1.1 +++ Worksheet.php 18 Nov 2009 03:58:50 -0000 @@ -1264,10 +1264,10 @@ } // Strip the = or @ sign at the beginning of the formula string - if (ereg("^=",$formula)) { + if (preg_match("/^=/",$formula)) { $formula = preg_replace("/(^=)/","",$formula); } - elseif(ereg("^@",$formula)) { + elseif(preg_match("/^@/",$formula)) { $formula = preg_replace("/(^@)/","",$formula); } else { '; $this->assertEquals('
' . $diff . '
', $this->filter->filter('
' . $diff . '
')); } }