From 2b42cc5efd91b9c1ef948b7f304241252cfea232 Mon Sep 17 00:00:00 2001 From: Eileen Date: Fri, 3 Jan 2014 19:48:05 +1300 Subject: [PATCH] test enotice compliance ProfileEditorTest --- .../phpunit/CRM/UF/Page/ProfileEditorTest.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php b/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php index f8b4094ff8..762e5fed9e 100644 --- a/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php +++ b/tests/phpunit/CRM/UF/Page/ProfileEditorTest.php @@ -2,10 +2,6 @@ require_once 'CiviTest/CiviUnitTestCase.php'; class CRM_UF_Page_ProfileEditorTest 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 setUp() { parent::setUp(); } @@ -24,24 +20,24 @@ class CRM_UF_Page_ProfileEditorTest extends CiviUnitTestCase { } $this->assertEquals('Individual', $schema['IndividualModel']['schema']['first_name']['civiFieldType']); - $this->assertEmpty($schema['IndividualModel']['schema']['first_name']['civiIsLocation']); - $this->assertEmpty($schema['IndividualModel']['schema']['first_name']['civiIsPhone']); + $this->assertTrue(empty($schema['IndividualModel']['schema']['first_name']['civiIsLocation'])); + $this->assertTrue(empty($schema['IndividualModel']['schema']['first_name']['civiIsPhone'])); $this->assertEquals('Contact', $schema['IndividualModel']['schema']['street_address']['civiFieldType']); $this->assertNotEmpty($schema['IndividualModel']['schema']['street_address']['civiIsLocation']); - $this->assertEmpty($schema['IndividualModel']['schema']['street_address']['civiIsPhone']); + $this->assertTrue(empty($schema['IndividualModel']['schema']['street_address']['civiIsPhone'])); $this->assertEquals('Contact', $schema['IndividualModel']['schema']['phone_and_ext']['civiFieldType']); $this->assertNotEmpty($schema['IndividualModel']['schema']['phone_and_ext']['civiIsLocation']); $this->assertNotEmpty($schema['IndividualModel']['schema']['phone_and_ext']['civiIsPhone']); $this->assertEquals('Activity', $schema['ActivityModel']['schema']['activity_subject']['civiFieldType']); - $this->assertEmpty($schema['ActivityModel']['schema']['activity_subject']['civiIsLocation']); - $this->assertEmpty($schema['ActivityModel']['schema']['activity_subject']['civiIsPhone']); + $this->assertTrue(empty($schema['ActivityModel']['schema']['activity_subject']['civiIsLocation'])); + $this->assertTrue(empty($schema['ActivityModel']['schema']['activity_subject']['civiIsPhone'])); // don't mix up contacts and activities - $this->assertEmpty($schema['IndividualModel']['schema']['activity_subject']); - $this->assertEmpty($schema['ActivityModel']['schema']['street_address']); + $this->assertTrue(empty($schema['IndividualModel']['schema']['activity_subject'])); + $this->assertTrue(empty($schema['ActivityModel']['schema']['street_address'])); } } -- 2.25.1