示例#1
0
function todo($why, $todo_tests)
{
    todo_begin($why);
    call_user_func($todo_tests);
    todo_end();
}
示例#2
0
文件: test.php 项目: nmx/Modyllic
	include_ok($dir.'/inc_false.php');
	check_capture(false);

	require_ok($dir.'/inc_false.php');
	check_capture(false);

	is_deeply($struct_1, $struct_2, 'is_deeply()');
	check_capture(false);

	todo_begin("Testing");

	fail("example unimplemented todo test");
	check_capture(false);

	todo_end();

        // in 5.3 we would pass an anonymous function
	function ex_todo_fail() {
		fail("example fail in subroutine");
	}
	todo( "Testing", "ex_todo_fail" );
	check_capture(false);

	
	$GLOBALS['_no_plan'] = false;
	$GLOBALS['_num_failures'] = 0;

	if ($GLOBALS['_meta_failures']){
		$GLOBALS['_meta_tests']--;
		echo "# Looks like you failed {$GLOBALS['_meta_failures']} tests of {$GLOBALS['_meta_tests']}.\n";