Previously this relied on getting all known classes/functions/etc when it was loaded, and then again after the PHP module being tested was loaded. This approach no longer works now we've stopped loading modules using dl(), so use ReflectionExtension instead to get information about a specific extension. This is likely also faster than wading through lists including everything predefined by PHP.
10 lines
282 B
PHP
10 lines
282 B
PHP
<?php
|
|
|
|
require "tests.php";
|
|
|
|
check::functions(array('GUINT16_SWAP_LE_BE_CONSTANT', 'maximum'));
|
|
|
|
check::equal(maximum(2.3, 2.4), 2.4, "maximum() doesn't work");
|
|
check::equal(guint16_swap_le_be_constant(0x1234), 0x3412, "GUINT16_SWAP_LE_BE_CONSTANT() doesn't work");
|
|
|
|
check::done();
|