simpletest-navigation MDL-20395 Fixed up regressions in the simpletest caused by recent changes to upgrades to navigation lib.

Also fixed issue whereby PAGE->set_url was being called by testdeprecatedlib but not being reset to the original value causing several flow on errors through simpletests
This commit is contained in:
samhemelryk
2009-10-01 02:31:42 +00:00
parent e28112cc52
commit c705a24eb2
4 changed files with 38 additions and 60 deletions
+5
View File
@@ -65,10 +65,15 @@ class outputlib_methods_test extends UnitTestCase {
// relative URL with & params
$newlink = 'index.php?param1=value1&param2=value2';
$oldurl = $PAGE->url;
$PAGE->set_url('index.php');
$html = print_single_button($newlink, $options, $label, $method, '', $return, $tooltip, $disabled, $jsconfirmmessage, $formid);
$this->assert(new ContainsTagWithAttributes('form', array('method' => $method, 'action' => $CFG->wwwroot . '/index.php')), $html);
$this->assert(new ContainsTagWithAttributes('input', array('type' => 'hidden', 'name' => 'param1', 'value' => 'value1')), $html);
$this->assert(new ContainsTagWithAttributes('input', array('type' => 'submit', 'value' => 'OK')), $html);
$PAGE->set_url($oldurl);
}
}