From b20425737306fd40abdf695581cbb4e6b217644b Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 26 Jul 2013 14:09:46 +1200 Subject: [PATCH] CRM-13072 mark non e-notice compliant tests --- .../phpunit/CRM/Core/BAO/CustomFieldTest.php | 18 ++++++---- tests/phpunit/CRM/Core/BAO/PhoneTest.php | 4 +++ tests/phpunit/CRM/Core/BAO/SettingTest.php | 4 +++ .../CRM/Core/CommunityMessagesTest.php | 5 ++- .../phpunit/CRM/Core/ManagedEntitiesTest.php | 4 +++ tests/phpunit/CRM/Core/Page/AJAXTest.php | 4 +++ .../CRM/Core/Payment/AuthorizeNetTest.php | 4 +++ .../phpunit/CRM/Core/Payment/BaseIPNTest.php | 4 +++ .../phpunit/CRM/Event/BAO/ParticipantTest.php | 4 +++ .../api/v3/dataset/financial_accounts.xml | 34 ------------------- 10 files changed, 43 insertions(+), 42 deletions(-) delete mode 100644 tests/phpunit/api/v3/dataset/financial_accounts.xml diff --git a/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php b/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php index ab66a26539..6d85f26f92 100644 --- a/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php +++ b/tests/phpunit/CRM/Core/BAO/CustomFieldTest.php @@ -3,6 +3,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; require_once 'CiviTest/Contact.php'; require_once 'CiviTest/Custom.php'; class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'Custom Field BAOs', @@ -47,7 +51,7 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { Custom::deleteGroup($customGroup); } - + function testCreateCustomfieldColumnName() { $customGroup = Custom::createGroup(array(), 'Individual'); $fields = array( @@ -232,8 +236,8 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { // Alice: Group[B] has fields[countryB], but fields[countryC] did not exist before $this->assertDBQuery(1, - "SELECT count(*) FROM {$groups['B']->table_name} - WHERE entity_id = %1 + "SELECT count(*) FROM {$groups['B']->table_name} + WHERE entity_id = %1 AND {$fields['countryB']->column_name} = %3 AND {$fields['countryC']->column_name} is null", array( @@ -244,8 +248,8 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { // Bob: Group[B] has merged fields[countryB] and fields[countryC] on the same record $this->assertDBQuery(1, - "SELECT count(*) FROM {$groups['B']->table_name} - WHERE entity_id = %1 + "SELECT count(*) FROM {$groups['B']->table_name} + WHERE entity_id = %1 AND {$fields['countryB']->column_name} = %3 AND {$fields['countryC']->column_name} = %4", array( @@ -257,8 +261,8 @@ class CRM_Core_BAO_CustomFieldTest extends CiviUnitTestCase { // Carol: Group[B] still has fields[countryC] but did not get fields[countryB] $this->assertDBQuery(1, - "SELECT count(*) FROM {$groups['B']->table_name} - WHERE entity_id = %1 + "SELECT count(*) FROM {$groups['B']->table_name} + WHERE entity_id = %1 AND {$fields['countryB']->column_name} is null AND {$fields['countryC']->column_name} = %4", array( diff --git a/tests/phpunit/CRM/Core/BAO/PhoneTest.php b/tests/phpunit/CRM/Core/BAO/PhoneTest.php index d7b7726f45..ab4fdb3055 100644 --- a/tests/phpunit/CRM/Core/BAO/PhoneTest.php +++ b/tests/phpunit/CRM/Core/BAO/PhoneTest.php @@ -31,6 +31,10 @@ require_once 'CiviTest/Contact.php'; require_once 'CiviTest/Custom.php'; require_once 'CiviTest/Event.php'; class CRM_Core_BAO_PhoneTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'Phone BAOs', diff --git a/tests/phpunit/CRM/Core/BAO/SettingTest.php b/tests/phpunit/CRM/Core/BAO/SettingTest.php index 097dce012e..552bd5b983 100644 --- a/tests/phpunit/CRM/Core/BAO/SettingTest.php +++ b/tests/phpunit/CRM/Core/BAO/SettingTest.php @@ -28,6 +28,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_Core_BAO_SettingTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'Setting BAO', diff --git a/tests/phpunit/CRM/Core/CommunityMessagesTest.php b/tests/phpunit/CRM/Core/CommunityMessagesTest.php index 82bafe0ef0..dde94c6c5f 100644 --- a/tests/phpunit/CRM/Core/CommunityMessagesTest.php +++ b/tests/phpunit/CRM/Core/CommunityMessagesTest.php @@ -29,7 +29,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase { - + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; /** * @var CRM_Utils_Cache_Interface */ diff --git a/tests/phpunit/CRM/Core/ManagedEntitiesTest.php b/tests/phpunit/CRM/Core/ManagedEntitiesTest.php index bd0b997953..ff7b704e48 100644 --- a/tests/phpunit/CRM/Core/ManagedEntitiesTest.php +++ b/tests/phpunit/CRM/Core/ManagedEntitiesTest.php @@ -3,6 +3,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_Core_ManagedEntitiesTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'ManagedEntities', diff --git a/tests/phpunit/CRM/Core/Page/AJAXTest.php b/tests/phpunit/CRM/Core/Page/AJAXTest.php index 35c9dfb75d..28adafd279 100644 --- a/tests/phpunit/CRM/Core/Page/AJAXTest.php +++ b/tests/phpunit/CRM/Core/Page/AJAXTest.php @@ -3,6 +3,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_Core_Page_AJAXTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; public function testCheckAuthz() { $cases = array(); diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php index 11619b5542..d35872a40a 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php @@ -30,6 +30,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; require_once 'CiviTest/AuthorizeNet.php'; require_once 'CiviTest/Contact.php'; class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'Authorize.net processing', diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index b803f8afd8..def539fe07 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -28,6 +28,10 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; protected $_contributionTypeId; protected $_contributionParams; protected $_contactId; diff --git a/tests/phpunit/CRM/Event/BAO/ParticipantTest.php b/tests/phpunit/CRM/Event/BAO/ParticipantTest.php index 143a850b2a..253f32a9cc 100644 --- a/tests/phpunit/CRM/Event/BAO/ParticipantTest.php +++ b/tests/phpunit/CRM/Event/BAO/ParticipantTest.php @@ -32,6 +32,10 @@ require_once 'CiviTest/Contact.php'; require_once 'CiviTest/Event.php'; require_once 'CiviTest/Participant.php'; class CRM_Event_BAO_ParticipantTest extends CiviUnitTestCase { + //@todo make BAO enotice compliant & remove the line below + // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE + // new test classes should be compliant. + public $_eNoticeCompliant = FALSE; function get_info() { return array( 'name' => 'Participant BAOs', diff --git a/tests/phpunit/api/v3/dataset/financial_accounts.xml b/tests/phpunit/api/v3/dataset/financial_accounts.xml deleted file mode 100644 index 5cfee5ca32..0000000000 --- a/tests/phpunit/api/v3/dataset/financial_accounts.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - id - name - accounting_code - description - is_deductible - is_reserved - is_active - financial_account_type_id - - 10 - Gift - 1004 - For some worthwhile cause - 0 - - 1 - 3 - - - 11 - Prize - 1005 - Also for some worthwhile cause - 0 - - 1 - 3 - -
-
-- 2.25.1