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
. /** * Contains tests for the \core_course\local\entity\content_item class. * * @package core * @subpackage course * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_course; defined('MOODLE_INTERNAL') || die(); use core_course\local\entity\content_item; use core_course\local\entity\lang_string_title; use core_course\local\entity\string_title; /** * Tests for the \core_course\local\entity\content_item class. * * @package core * @subpackage course * @copyright 2020 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class content_item_test extends \advanced_testcase { /** * Test the content_item class. */ public function test_content_item() { $this->resetAfterTest(); $contentitem = new content_item(22, 'Item name', new lang_string_title('modulename', 'mod_assign'), new \moodle_url('mod_edit.php'), '', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page', MOD_PURPOSE_CONTENT); $this->assertEquals(22, $contentitem->get_id()); $this->assertEquals('Item name', $contentitem->get_name()); $this->assertEquals('Assignment', $contentitem->get_title()->get_value()); $this->assertEquals(new \moodle_url('mod_edit.php'), $contentitem->get_link()); $this->assertEquals('', $contentitem->get_icon()); $this->assertEquals('Description of the module', $contentitem->get_help()); $this->assertEquals(MOD_ARCHETYPE_RESOURCE, $contentitem->get_archetype()); $this->assertEquals('mod_page', $contentitem->get_component_name()); $this->assertEquals('content', $contentitem->get_purpose()); } /** * Test confirming that plugins can return custom titles for a content item. */ public function test_content_item_custom_string_title() { $this->resetAfterTest(); $contentitem = new content_item(22, 'Item name', new string_title('My custom string'), new \moodle_url('mod_edit.php'), '', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page', MOD_PURPOSE_CONTENT); $this->assertEquals('My custom string', $contentitem->get_title()->get_value()); } }