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


PHP EEM_Registration::reset方法代码示例

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


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

示例1: test__set_registration_status_from_request_for_multiple_registrations

 /**
  * @since 4.8.10.rc.10
  * @group integration
  */
 public function test__set_registration_status_from_request_for_multiple_registrations()
 {
     //basically the same as the prior test except here we're testing multiple registrations.
     $registration_a = $this->factory->registration->create(array('STS_ID' => EEM_Registration::status_id_cancelled));
     $registration_b = $this->factory->registration->create(array('STS_ID' => EEM_Registration::status_id_pending_payment));
     $registration_c = $this->factory->registration->create(array('STS_ID' => EEM_Registration::status_id_not_approved));
     $expected_ids = array($registration_a->ID(), $registration_b->ID(), $registration_c->ID());
     $_REQUEST['_REG_ID'] = $expected_ids;
     $this->_load_requirements();
     $success = $this->_admin_page->set_registration_status_from_request(EEM_Registration::status_id_not_approved);
     $this->assertArrayHasKey('success', $success);
     $this->assertTrue($success['success']);
     $this->assertArrayHasKey('REG_ID', $success);
     $this->assertCount(3, $success['REG_ID']);
     $this->assertEquals($expected_ids, $success['REG_ID']);
     //verify registrations got chagned to approved (or stayed there).
     $registrations = EEM_Registration::reset()->instance()->get_all(array(array('STS_ID' => EEM_Registration::status_id_not_approved)));
     $this->assertEquals(3, count($registrations));
     $this->assertEquals($expected_ids, array_keys($registrations));
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:24,代码来源:Registrations_Admin_Page_Test.php

示例2: _pretend_added_field_onto_registration_model

 protected function _pretend_added_field_onto_registration_model()
 {
     add_filter('FHEE__EEM_Registration__construct__fields', array($this, '_add_reg_paid_field'));
     EEM_Registration::reset();
 }
开发者ID:teemuoksanen,项目名称:event-espresso-core,代码行数:5,代码来源:Model_Version_Info_Test.php


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