本文整理汇总了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'));
}