From 901c4a8eb8d377f721c705d6fdb697423c7d3b6f Mon Sep 17 00:00:00 2001 From: Roland Kovacsics Date: Fri, 29 May 2020 16:19:50 +0200 Subject: [PATCH] Rename the Section to the new correct name: Guideline --- .../{ElementSectionTest.php => ElementGuidelineTest.php} | 6 +++--- src-dev/Tests/Unit/GcBaseTestCase.php | 8 ++++---- .../{ElementSection.php => ElementGuideline.php} | 2 +- src/DataTypes/Group.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename src-dev/Tests/Unit/DataTypes/{ElementSectionTest.php => ElementGuidelineTest.php} (83%) rename src/DataTypes/{ElementSection.php => ElementGuideline.php} (76%) diff --git a/src-dev/Tests/Unit/DataTypes/ElementSectionTest.php b/src-dev/Tests/Unit/DataTypes/ElementGuidelineTest.php similarity index 83% rename from src-dev/Tests/Unit/DataTypes/ElementSectionTest.php rename to src-dev/Tests/Unit/DataTypes/ElementGuidelineTest.php index 2d3a04a..723ffb2 100644 --- a/src-dev/Tests/Unit/DataTypes/ElementSectionTest.php +++ b/src-dev/Tests/Unit/DataTypes/ElementGuidelineTest.php @@ -2,17 +2,17 @@ namespace Cheppers\GatherContent\Tests\Unit\DataTypes; -use Cheppers\GatherContent\DataTypes\ElementSection; +use Cheppers\GatherContent\DataTypes\ElementGuideline; /** * @group GatherContentClient */ -class ElementSectionTest extends BaseTest +class ElementGuidelineTest extends BaseTest { /** * {@inheritdoc} */ - protected $className = ElementSection::class; + protected $className = ElementGuideline::class; /** * {@inheritdoc} diff --git a/src-dev/Tests/Unit/GcBaseTestCase.php b/src-dev/Tests/Unit/GcBaseTestCase.php index 9909e24..46a9b7c 100644 --- a/src-dev/Tests/Unit/GcBaseTestCase.php +++ b/src-dev/Tests/Unit/GcBaseTestCase.php @@ -158,7 +158,7 @@ public static function getUniqueResponseElements(array $elementTypes) foreach ($elementTypes as $elementType) { switch ($elementType) { case 'text': - case 'section': + case 'guideline': $elements[static::getUniqueString('uuid')] = static::getUniqueResponseElementText(); break; @@ -191,8 +191,8 @@ public static function getUniqueResponseGroup(array $elementTypes) $group['fields'][] = static::getUniqueResponseElementTemplateFiles(); break; - case 'section': - $group['fields'][] = static::getUniqueResponseElementTemplateSection(); + case 'guideline': + $group['fields'][] = static::getUniqueResponseElementTemplateGuideline(); break; case 'choice_radio': @@ -288,7 +288,7 @@ public static function getUniqueResponseElementTemplateText() return $element; } - public static function getUniqueResponseElementTemplateSection() + public static function getUniqueResponseElementTemplateGuideline() { $element = static::getUniqueResponseElement(); $element['field_type'] = 'guidelines'; diff --git a/src/DataTypes/ElementSection.php b/src/DataTypes/ElementGuideline.php similarity index 76% rename from src/DataTypes/ElementSection.php rename to src/DataTypes/ElementGuideline.php index b0e9de9..62d6a33 100644 --- a/src/DataTypes/ElementSection.php +++ b/src/DataTypes/ElementGuideline.php @@ -2,7 +2,7 @@ namespace Cheppers\GatherContent\DataTypes; -class ElementSection extends Element +class ElementGuideline extends Element { /** * {@inheritdoc} diff --git a/src/DataTypes/Group.php b/src/DataTypes/Group.php index e0e2f7a..46297e9 100644 --- a/src/DataTypes/Group.php +++ b/src/DataTypes/Group.php @@ -7,7 +7,7 @@ class Group extends Base protected static $type2Class = [ 'text' => ElementText::class, 'attachment' => Element::class, - 'guidelines' => ElementSection::class, + 'guidelines' => ElementGuideline::class, 'choice_checkbox' => ElementCheckbox::class, 'choice_radio' => ElementRadio::class, ];