當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。