|
| __construct ($name=null, array $data=array(), $dataName='') |
| Constructs a test case with the given name.
|
|
| assertDebuggingCalled ($debugmessage=null, $debuglevel=null, $message='') |
| Assert that exactly debugging was just called once.
|
|
| assertDebuggingNotCalled ($message='') |
| Call when no debugging() messages expected.
|
|
| assertEqualsIgnoringWhitespace ($expected, $actual, string $message='') |
| Assert that two Date/Time strings are equal.
|
|
| getDebuggingMessages () |
| Return debugging messages from the current test.
|
|
| resetDebugging () |
| Clear all previous debugging messages in current test.
|
|
| runBare () |
| Runs the bare test sequence.
|
|
|
static | assertNotTag ($matcher, $actual, $message='', $ishtml=true) |
| Note: we are overriding this method to remove the deprecated error.
|
|
static | assertTag ($matcher, $actual, $message='', $ishtml=true) |
| Note: we are overriding this method to remove the deprecated error.
|
|
static | assertValidKeys (array $hash, array $validKeys) |
| Validate list of keys in the associative array.
|
|
static | findNodes (DOMDocument $dom, array $options, $isHtml=true) |
| Parse out the options from the tag using DOM object tree.
|
|
static | setUpBeforeClass () |
|
static | tearDownAfterClass () |
|
Database driver test case.
- Copyright
- 2012 Petr Skoda
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Special test case for testing of DML drivers and DDL layer.
Note: Use only 'test_table*' names when creating new tables.
For DML/DDL developers: you can add following settings to config.php if you want to test different driver than the main one, the reason is to allow testing of incomplete drivers that do not allow full PHPUnit environment initialisation (the database can be empty). $CFG->phpunit_extra_drivers = array( 1=>array('dbtype'=>'mysqli', 'dbhost'=>'localhost', 'dbname'=>'moodle', 'dbuser'=>'root', 'dbpass'=>'', 'prefix'=>'phpu2_'), 2=>array('dbtype'=>'pgsql', 'dbhost'=>'localhost', 'dbname'=>'moodle', 'dbuser'=>'postgres', 'dbpass'=>'', 'prefix'=>'phpu2_'), 3=>array('dbtype'=>'sqlsrv', 'dbhost'=>'127.0.0.1', 'dbname'=>'moodle', 'dbuser'=>'sa', 'dbpass'=>'', 'prefix'=>'phpu2_'), 4=>array('dbtype'=>'oci', 'dbhost'=>'127.0.0.1', 'dbname'=>'XE', 'dbuser'=>'sa', 'dbpass'=>'', 'prefix'=>'t_'), ); define('PHPUNIT_TEST_DRIVER')=1; //number is index in the previous array
- Copyright
- 2012 Petr Skoda
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
base_testcase::assertEqualsIgnoringWhitespace |
( |
| $expected, |
|
|
| $actual, |
|
|
string | $message = '' ) |
|
inherited |
Assert that two Date/Time strings are equal.
The strings generated by DateTime, strtotime, date, time, etc. are generated outside of our control. From time-to-time string changes are made. One such example is from ICU 72.1 which changed the time format to include a narrow-non-breaking-space (U+202F) between the time and AM/PM.
We should not update our tests to match these changes, as it is not our code that is generating the strings and they may change again. In addition, the changes are not equal amongst all systems as they depend on the version of ICU installed.
- Parameters
-
string | $expected | |
string | $actual | |
string | $message | |