本文整理匯總了PHP中debug_mock::expect_write_notice方法的典型用法代碼示例。如果您正苦於以下問題:PHP debug_mock::expect_write_notice方法的具體用法?PHP debug_mock::expect_write_notice怎麽用?PHP debug_mock::expect_write_notice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類debug_mock
的用法示例。
在下文中一共展示了debug_mock::expect_write_notice方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_group
function test_group()
{
$ini =& ini::instance('test.ini', TEST_CASES_DIR, false);
debug_mock::expect_write_notice('unknown block', array('ini' => $ini->file_name(), 'block_name' => 'no_group'));
$this->assertNull($ini->group('no_group'));
$this->assertNotNull($ini->group('default'));
$group = $ini->group('test2');
$this->assertTrue(is_array($group) && sizeof($group) == 3);
$this->assertEqual($group['test1'], 2);
$this->assertEqual($group['test2'], 3);
$this->assertEqual($group['test3'], " #It's just a \"test\"!# ");
}
示例2: array
function test_get_group()
{
register_testing_ini(
'testing.ini',
'
unassigned =
test = 1
[test]
test = 1
'
);
$ini =& get_ini('testing.ini');
$this->assertEqual($ini->get_group('default'), array('unassigned' => '', 'test' => 1));
$this->assertEqual($ini->get_group('test'), array('test' => 1));
debug_mock :: expect_write_notice('undefined group',
array(
'ini' => $ini->get_original_file(),
'group' => 'no_such_group'
)
);
$this->assertNull($ini->get_group('no_such_group'));
}