MDL-21577 removing tests for removed features
authorPetr Skoda <skodak@moodle.org>
Wed, 10 Feb 2010 16:27:49 +0000 (16:27 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 10 Feb 2010 16:27:49 +0000 (16:27 +0000)
lib/simpletest/testoutputlib.php

index 0c604ae..da8dc3e 100644 (file)
@@ -556,24 +556,6 @@ class core_renderer_test extends UnitTestCase {
         $this->renderer = new core_renderer(new moodle_page);
     }
 
-    public function test_select_simple() {
-        $select = html_select::make(array(10 => 'ten', 'c2' => 'two'), 'mymenu');
-        $html = $this->renderer->select($select);
-        $this->assert(new ContainsTagWithAttributes('select', array('class' => 'menumymenu select', 'name' => 'mymenu', 'id' => 'menumymenu')), $html);
-        $this->assert(new ContainsTagWithContents('option', 'ten'), $html);
-        $this->assert(new ContainsTagWithAttribute('option', 'value', '10'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'two'), $html);
-        $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_error_text() {
         $html = $this->renderer->error_text('message');
         $this->assert(new ContainsTagWithContents('span', 'message'), $html);
@@ -837,34 +819,6 @@ class core_renderer_test extends UnitTestCase {
         $html = $this->renderer->htmllist($htmllist);
     }
 
-    public function test_html_select() {
-        $options = array('var1' => 'value1', 'var2' => 'value2', 'var3' => 'value3');
-        $select = html_select::make($options, 'mymenu', 'var2');
-        $html = $this->renderer->select($select);
-        $this->assert(new ContainsTagWithAttributes('select', array('name' => 'mymenu')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var1'), array('selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var2', 'selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var3'), array('selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value1'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value2'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value3'), $html);
-
-        $options = array('group1' => '--group1', 'var1' => 'value1', 'var2' => 'value2', 'group2' => '--', 'group2' => '--group2', 'var3' => 'value3', 'var4' => 'value4');
-        $select = html_select::make($options, 'mymenu', 'var2');
-        $html = $this->renderer->select($select);
-        $this->assert(new ContainsTagWithAttributes('select', array('name' => 'mymenu')), $html);
-        $this->assert(new ContainsTagWithAttributes('optgroup', array('label' => 'group1')), $html);
-        $this->assert(new ContainsTagWithAttributes('optgroup', array('label' => 'group2')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var1'), array('selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var2', 'selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var3'), array('selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithAttributes('option', array('value' => 'var4'), array('selected' => 'selected')), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value1'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value2'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value3'), $html);
-        $this->assert(new ContainsTagWithContents('option', 'value4'), $html);
-    }
-
     public function test_userpicture() {
         global $CFG;
         // Set up the user with the required fields