Skip to content

Commit

Permalink
Merge pull request #17269 from greenpeace-cee/simplify-length-test
Browse files Browse the repository at this point in the history
CRM/Logging - Remove obsolete cache static clear in test
  • Loading branch information
mattwire authored May 10, 2020
2 parents 9210ed3 + 70671c3 commit 20b4da8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/phpunit/CRM/Logging/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ public function testLengthChange() {
CHANGE COLUMN test_integer test_integer int(6) NULL,
CHANGE COLUMN test_decimal test_decimal decimal(22,2) NULL"
);
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
// need to do it twice so the columnSpecs static is refreshed
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
$ci = \Civi::$statics['CRM_Logging_Schema']['columnSpecs'];
// length should increase
Expand All @@ -293,9 +289,6 @@ public function testLengthChange() {
CHANGE COLUMN test_integer test_integer int(4) NULL,
CHANGE COLUMN test_decimal test_decimal decimal(20,2) NULL"
);
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
$ci = \Civi::$statics['CRM_Logging_Schema']['columnSpecs'];
// length should not decrease
Expand All @@ -314,9 +307,6 @@ public function testEnumChange() {
CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_test_enum_change CHANGE COLUMN test_enum test_enum enum('A','B','C','D') NULL");
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
// need to do it twice so the columnSpecs static is refreshed
\Civi::$statics['CRM_Logging_Schema']['columnSpecs'] = [];
$schema->fixSchemaDifferences();
$ci = \Civi::$statics['CRM_Logging_Schema']['columnSpecs'];
// new enum value should be included
$this->assertEquals("'A','B','C','D'", $ci['civicrm_test_enum_change']['test_enum']['ENUM_VALUES']);
Expand Down

0 comments on commit 20b4da8

Please sign in to comment.