See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
Unit tests for the numerical questions answers processor.
Copyright: | 2008 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 347 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
answerprocessor_test:: (14 methods):
setUp()
test_parse_response()
parse_response_provider()
verify_value_and_unit()
test_apply_units()
apply_units_provider()
test_apply_units_with_unit()
apply_units_provider_with_units()
test_euro_style()
euro_provider()
test_percent()
percent_provider()
test_currency()
currency_provider()
Class: answerprocessor_test - X-Ref
Unit test for the numerical questions answers processor.setUp() X-Ref |
Test setup. |
test_parse_response(array $expected, $args) X-Ref |
Test the parse_response function. param: array $expected param: mixed $args |
parse_response_provider() X-Ref |
Data provider for the parse_response function. return: array |
verify_value_and_unit($exectedval,$expectedunit,$expectedmultiplier,qtype_numerical_answer_processor $ap,$input,$separateunit = null) X-Ref |
Call apply_units and verify the value and units returned. param: int|float $exectedval param: null|string $expectedunit param: int|float $expectedmultiplier param: qtype_numerical_answer_processor $ap param: null|int|float $input param: null|string $separateunit |
test_apply_units($expectedvalue,$expectedunit,$expectedmultiplier,$input) X-Ref |
Test the apply_units function with various parameters. param: mixed $expectedvalue param: string|null $expectedunit param: float|int|null $expectedmultiplier param: string|null $input |
apply_units_provider() X-Ref |
Data provider for apply_units tests. return: array |
test_apply_units_with_unit($expectedvalue,$expectedunit,$expectedmultiplier,$input,$units) X-Ref |
Test the apply_units function with various parameters and different units. param: mixed $expectedvalue param: string|null $expectedunit param: float|int|null $expectedmultiplier param: string|null $input param: string $units |
apply_units_provider_with_units() X-Ref |
Data provider for apply_units with different units. return: array |
test_euro_style(array $expected, string $params) X-Ref |
Test apply_units with a comma float unit. param: array $expected param: string $params |
euro_provider() X-Ref |
Data provider for apply_units with euro float separators. return array |
test_percent(array $expected, string $params) X-Ref |
Test apply_units with percentage values. param: array $expected param: string $params |
percent_provider() X-Ref |
Data provider for apply_units with percentages. return: array |
test_currency(array $expected, string $params) X-Ref |
Test apply_units with currency values. param: array $expected param: string $params |
currency_provider() X-Ref |
Data provider for apply_units with currency values. return: array |