test break fixes
[civicrm-core.git] / tests / phpunit / api / v3 / APIWrapperTest.php
index 6df7694048bd23c406be7341caf3ed8000663fcb..d1f27390cf86cd485f204cb50ac4e2d79171c9bf 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -43,19 +43,16 @@ class api_v3_APIWrapperTest extends CiviUnitTestCase {
   /**
    * Sets up the fixture, for example, opens a network connection.
    * This method is called before a test is executed.
-   *
-   * @access protected
    */
   protected function setUp() {
     parent::setUp();
+    $this->useTransaction(TRUE);
     CRM_Utils_Hook_UnitTests::singleton()->setHook('civicrm_apiWrappers', array($this, 'onApiWrappers'));
   }
 
   /**
    * Tears down the fixture, for example, closes a network connection.
    * This method is called after a test is executed.
-   *
-   * @access protected
    */
   protected function tearDown() {
     parent::tearDown();
@@ -65,7 +62,7 @@ class api_v3_APIWrapperTest extends CiviUnitTestCase {
    * @param $apiWrappers
    * @param $apiRequest
    */
-  function onApiWrappers(&$apiWrappers, $apiRequest) {
+  public function onApiWrappers(&$apiWrappers, $apiRequest) {
     $this->assertTrue(is_string($apiRequest['entity']) && !empty($apiRequest['entity']));
     $this->assertTrue(is_string($apiRequest['action']) && !empty($apiRequest['action']));
     $this->assertTrue(is_array($apiRequest['params']) && !empty($apiRequest['params']));
@@ -73,7 +70,7 @@ class api_v3_APIWrapperTest extends CiviUnitTestCase {
     $apiWrappers[] = new api_v3_APIWrapperTest_Impl();
   }
 
-  function testWrapperHook() {
+  public function testWrapperHook() {
     // Note: this API call would fail due to missing contact_type, but
     // the wrapper intervenes (fromApiInput)
     // Note: The output would define "display_name", but the wrapper