Skip to content

Commit

Permalink
Rename the Section to the new correct name: Guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland Kovacsics committed May 29, 2020
1 parent 6ee827e commit 901c4a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
8 changes: 4 additions & 4 deletions src-dev/Tests/Unit/GcBaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Cheppers\GatherContent\DataTypes;

class ElementSection extends Element
class ElementGuideline extends Element
{
/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion src/DataTypes/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
Expand Down

0 comments on commit 901c4a8

Please sign in to comment.