-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
78 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,31 +20,22 @@ | |
use qtype_varnumericset_number_interpreter_number_with_optional_decimal_place; | ||
use qtype_varnumericset_number_interpreter_number_with_optional_sci_notation; | ||
|
||
/** | ||
* Unit tests for the number interpreter classes . | ||
* | ||
* @package qtype_varnumericset | ||
* @copyright 2012 The Open University | ||
* @author Jamie Pratt [email protected] | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
global $CFG; | ||
|
||
require_once($CFG->dirroot . '/question/type/varnumericset/number_interpreter.php'); | ||
|
||
|
||
/** | ||
* Unit tests for the number interpreter classes . | ||
* | ||
* @package qtype_varnumericset | ||
* @copyright 2012 The Open University | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
* @group qtype_varnumericset | ||
* @covers \qtype_varnumericset_number_interpreter_number_with_optional_decimal_place | ||
* @covers \qtype_varnumericset_number_interpreter_number_with_optional_sci_notation | ||
*/ | ||
class number_interpreter_test extends basic_testcase { | ||
public function test_interpret_number_with_optional_decimal_place() { | ||
public function test_interpret_number_with_optional_decimal_place(): void { | ||
$num = new qtype_varnumericset_number_interpreter_number_with_optional_decimal_place(); | ||
|
||
$this->assertFalse($num->match('newt')); | ||
|
@@ -91,7 +82,7 @@ public function test_interpret_number_with_optional_decimal_place() { | |
$this->assertSame('', $num->get_postfix()); | ||
} | ||
|
||
public function test_interpret_number_with_optional_sci_notation_not_accepting_html_exponent() { | ||
public function test_interpret_number_with_optional_sci_notation_not_accepting_html_exponent(): void { | ||
$num = new qtype_varnumericset_number_interpreter_number_with_optional_sci_notation(false); | ||
|
||
$this->assertFalse($num->match('newt')); | ||
|
@@ -155,7 +146,7 @@ public function test_interpret_number_with_optional_sci_notation_not_accepting_h | |
$this->assertSame('m', $num->get_postfix()); | ||
} | ||
|
||
public function test_interpret_number_with_optional_sci_notation_accepting_html_exponent() { | ||
public function test_interpret_number_with_optional_sci_notation_accepting_html_exponent(): void { | ||
$num = new qtype_varnumericset_number_interpreter_number_with_optional_sci_notation(true); | ||
|
||
$this->assertFalse($num->match('newt')); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.