* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class standard_renderer_factory_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $factory;
public function setUp() {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class custom_corners_renderer_factory_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $factory;
public function setUp() {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_theme_overridden_renderer_factory extends theme_overridden_renderer_factory {
+
+ public static $includecoverage = array('lib/outputlib.php');
public function get_prefixes() {
return $this->prefixes;
}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class theme_overridden_renderer_factory_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputlib.php');
protected $originalcfgthemedir;
protected $workspace;
protected $page;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_template_renderer_factory extends template_renderer_factory {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
public function get_search_paths() {
return $this->searchpaths;
}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class template_renderer_factory_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $originalcfgthemedir;
protected $workspace;
protected $page;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class xhtml_container_stack_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputlib.php');
protected function start_capture() {
ob_start();
}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class template_renderer_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $renderer;
protected $templatefolder;
protected $savedtemplates;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class moodle_core_renderer_test extends UnitTestCase {
+
+ public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $renderer;
public function setUp() {
$this->assert(new ContainsTagWithAttribute('option', 'value', 'c2'), $html);
}
+ public function test_select_with_label() {
+ $select = html_select::make(array(10 => 'ten', 'c2' => 'two'), 'mymenu');
+ $select->set_label('Cool menu');
+ $html = $this->renderer->select($select);
+ $this->assert(new ContainsTagWithAttribute('label', 'for', $select->id), $html);
+ $this->assert(new ContainsTagWithContents('label', 'Cool menu'), $html);
+ }
+
+ public function test_select_yesno() {
+ $select = html_select::make_yes_no('question', 1);
+ $html = $this->renderer->select($select);
+ $this->assert(new ContainsTagWithAttributes('select', array('class' => 'menuquestion select', 'name' => 'question', 'id' => 'menuquestion')), $html);
+ $this->assert(new ContainsTagWithContents('option', get_string('choosedots')), $html);
+ $this->assert(new ContainsTagWithContents('option', get_string('yes')), $html);
+ $this->assert(new ContainsTagWithContents('option', get_string('no')), $html);
+ $this->assert(new ContainsTagWithAttributes('option', array('value' => '1', 'selected' => 'selected')), $html);
+ }
+
public function test_error_text() {
$html = $this->renderer->error_text('message');
$this->assert(new ContainsTagWithContents('span', 'message'), $html);