当前位置: 首页>>代码示例>>PHP>>正文


PHP debug_mock::expect_never_write方法代码示例

本文整理汇总了PHP中debug_mock::expect_never_write方法的典型用法代码示例。如果您正苦于以下问题:PHP debug_mock::expect_never_write方法的具体用法?PHP debug_mock::expect_never_write怎么用?PHP debug_mock::expect_never_write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在debug_mock的用法示例。


在下文中一共展示了debug_mock::expect_never_write方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_controller

 function test_controller()
 {
     $controller = $this->object->get_controller();
     if (is_a($controller, 'empty_controller')) {
         return;
     }
     $definitions = $controller->get_actions_definitions();
     $controller_class = get_class($controller);
     $empty_action = new empty_action();
     foreach ($definitions as $action => $data) {
         if (isset($data['template_path'])) {
             $template = new template($data['template_path']);
             $this->_check_template($template);
         }
         if (isset($data['action_path'])) {
             debug_mock::expect_never_write('write_error');
             $action_obj = action_factory::create($data['action_path']);
             $this->assertNotIdentical($action_obj, $empty_action, 'controller: "' . $controller_class . '" action object for action "' . $action . '"not found');
             $this->_check_action($action_obj);
         }
         if (isset($data['action_name'])) {
             $this->assertTrue($data['action_name'], 'controller: "' . $controller_class . '" action_name property for action "' . $action . '" is empty - check strings');
         }
     }
     $action = $controller->get_default_action();
     $this->assertTrue(isset($definitions[$action]), 'controller: "' . $controller_class . '" default action "' . $action . '" doesnt exist');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:27,代码来源:site_object_controller_tester.class.php

示例2: test_create

 function test_create()
 {
     debug_mock::expect_never_write();
     $this->object->set_parent_node_id($this->parent_node_id);
     $this->object->set_identifier('test_node');
     $id = $this->object->create();
     $this->assertNotIdentical($id, false, 'create operation failed');
     $this->assertEqual($id, $this->object->get_id());
     $this->_check_sys_site_object_tree_record();
     $this->_check_sys_site_object_record();
     $this->_check_sys_class_record();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:__site_object_manipulation.test.php

示例3: test_create_complex

 function test_create_complex()
 {
     debug_mock::expect_never_write();
     $this->_create_node('10ru1');
     $this->_create_node('10ru2');
     $this->_create_node('10a1');
     $this->_create_node(1000);
     $this->object->set_parent_node_id($this->parent_node_id);
     $this->object->set_identifier('node_test');
     $id = $this->object->create();
     $this->assertEqual($this->object->get_identifier(), '10ru3');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:site_object_auto_identifier_test.class.php

示例4: test_create_complex2

 function test_create_complex2()
 {
     debug_mock::expect_never_write();
     $this->_create_node('test');
     $this->_create_node('test8');
     $this->_create_node('test9');
     $this->_create_node('test10');
     $this->object->set_parent_node_id($this->parent_node_id);
     $this->object->set_identifier('node_test');
     $id = $this->object->create();
     $this->assertEqual($this->object->get_identifier(), 'test11');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:site_object_auto_identifier_test.class.php


注:本文中的debug_mock::expect_never_write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。