1--TEST-- 2misc assert() tests tests 3--INI-- 4assert.active = 1 5assert.warning = 1 6assert.callback = 7assert.bail = 0 8assert.quiet_eval = 0 9--FILE-- 10<?php 11/* Assert not active */ 12assert_options(ASSERT_ACTIVE, 0); 13assert(1); 14 15 16/* Wrong parameter count in assert */ 17assert_options(ASSERT_ACTIVE, 1); 18assert(2, "failure", 3); 19 20/* Wrong parameter count in assert_options */ 21assert_options(ASSERT_ACTIVE, 0, 2); 22 23/* Wrong parameter name in assert_options */ 24$test="ASSERT_FRED"; 25assert_options($test, 1); 26 27/* Assert false */ 28assert(0); 29 30 31/* Assert false and bail*/ 32assert_options(ASSERT_BAIL, 1); 33assert(0); 34 35echo "not reached\n"; 36 37?> 38--EXPECTF-- 39Warning: assert() expects at most 2 parameters, 3 given in %s on line %d 40 41Warning: assert_options() expects at most 2 parameters, 3 given in %s on line %d 42 43Warning: assert_options() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d 44 45Warning: assert(): Assertion failed in %s on line %d 46 47Warning: assert(): Assertion failed in %s on line %d 48 49