diff --git a/contentbank/classes/contenttype.php b/contentbank/classes/contenttype.php index f6bd810d4e486..b2c04e30ae8e6 100644 --- a/contentbank/classes/contenttype.php +++ b/contentbank/classes/contenttype.php @@ -14,14 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Content type manager class - * - * @package core_contentbank - * @copyright 2020 Amaia Anabitarte - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace core_contentbank; use core\event\contentbank_content_created; @@ -286,7 +278,7 @@ public function get_download_url(content $content): string { */ public function get_icon(content $content): string { global $OUTPUT; - return $OUTPUT->image_url('f/unknown-64', 'moodle')->out(false); + return $OUTPUT->image_url('f/unknown')->out(false); } /** diff --git a/contentbank/tests/contenttype_test.php b/contentbank/tests/contenttype_test.php index b6a9b82cbd410..ec53ef67f4af4 100644 --- a/contentbank/tests/contenttype_test.php +++ b/contentbank/tests/contenttype_test.php @@ -14,15 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Test for content bank contenttype class. - * - * @package core_contentbank - * @category test - * @copyright 2020 Amaia Anabitarte - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace core_contentbank; use stdClass; @@ -104,6 +95,8 @@ public function test_get_plugin_name() { * @covers ::get_icon */ public function test_get_icon() { + global $CFG; + $this->resetAfterTest(); $systemcontext = \context_system::instance(); @@ -111,8 +104,10 @@ public function test_get_icon() { $record = new stdClass(); $record->name = 'New content'; $content = $testable->create_content($record); - $icon = $testable->get_icon($content); - $this->assertStringContainsString('archive', $icon); + $this->assertEquals( + "{$CFG->wwwroot}/theme/image.php/boost/core/1/f/unknown", + $testable->get_icon($content), + ); } /** diff --git a/contentbank/tests/fixtures/testable_contenttype.php b/contentbank/tests/fixtures/testable_contenttype.php index 2bb242e06c77e..e74518e37a88e 100644 --- a/contentbank/tests/fixtures/testable_contenttype.php +++ b/contentbank/tests/fixtures/testable_contenttype.php @@ -14,15 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Testable contenttype plugin class. - * - * @package core_contentbank - * @category test - * @copyright 2020 Sara Arjona - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace contenttype_testable; /** @@ -40,18 +31,6 @@ class contenttype extends \core_contentbank\contenttype { /** @var array Additional features for testing */ public static $featurestotest; - /** - * Returns the HTML code to render the icon for content bank contents. - * - * @param content $content The content to delete. - * @return string HTML code to render the icon - */ - public function get_icon(\core_contentbank\content $content): string { - global $OUTPUT; - - return $OUTPUT->image_url('f/archive-64', 'moodle')->out(false); - } - /** * Return an array of implemented features by this plugin. *