Línea 68... |
Línea 68... |
68 |
*
|
68 |
*
|
69 |
* @param mixed $value value to be set.
|
69 |
* @param mixed $value value to be set.
|
70 |
* @param mixed $expectation value to be checked.
|
70 |
* @param mixed $expectation value to be checked.
|
71 |
* @dataProvider provider_test_set_get_value()
|
71 |
* @dataProvider provider_test_set_get_value()
|
72 |
*/
|
72 |
*/
|
73 |
public function test_set_get_value($value, $expectation) {
|
73 |
public function test_set_get_value($value, $expectation): void {
|
74 |
$session = $this->createMock(Session::class);
|
74 |
$session = $this->createMock(Session::class);
|
75 |
$node = $this->createMock(NodeElement::class);
|
75 |
$node = $this->createMock(NodeElement::class);
|
76 |
$node->method('getValue')->willReturn($value);
|
76 |
$node->method('getValue')->willReturn($value);
|
77 |
$field = new behat_form_text($session, $node);
|
77 |
$field = new behat_form_text($session, $node);
|
Línea 113... |
Línea 113... |
113 |
* @param mixed $value value to be set.
|
113 |
* @param mixed $value value to be set.
|
114 |
* @param mixed $match value to be matched.
|
114 |
* @param mixed $match value to be matched.
|
115 |
* @param bool $result expected return status of the function.
|
115 |
* @param bool $result expected return status of the function.
|
116 |
* @dataProvider provider_test_matches()
|
116 |
* @dataProvider provider_test_matches()
|
117 |
*/
|
117 |
*/
|
118 |
public function test_matches($decsep, $value, $match, $result) {
|
118 |
public function test_matches($decsep, $value, $match, $result): void {
|
119 |
global $CFG;
|
119 |
global $CFG;
|
Línea 120... |
Línea 120... |
120 |
|
120 |
|
121 |
// Switch of string manager to avoid having to (slow) customise the lang file.
|
121 |
// Switch of string manager to avoid having to (slow) customise the lang file.
|
122 |
$origcustom = $CFG->config_php_settings['customstringmanager'] ?? null;
|
122 |
$origcustom = $CFG->config_php_settings['customstringmanager'] ?? null;
|