Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
thangnn committed May 15, 2024
1 parent fc61610 commit e1f2341
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use BcCustomContent\Service\CustomFieldsServiceInterface;
use BcCustomContent\Service\CustomTablesServiceInterface;
use BcCustomContent\Test\Scenario\CustomFieldsScenario;
use Cake\Core\Configure;
use Cake\Datasource\Exception\RecordNotFoundException;
use Cake\ORM\Exception\PersistenceFailedException;
use CakephpFixtureFactories\Scenario\ScenarioAwareTrait;
Expand Down Expand Up @@ -217,6 +218,23 @@ public function test_getList()
*/
public function test_getFieldTypes()
{
Configure::write('BcCustomContent.fieldCategories',
[
__d('baser_core', '基本'),
__d('baser_core', '日付'),
__d('baser_core', '選択'),
__d('baser_core', 'コンテンツ'),
__d('baser_core', 'その他')
]
);
$types = Configure::read('BcCustomContent.fieldTypes');
$types['group'] = [
'category' => __d('baser_core', 'その他'),
'label' => __d('baser_core', 'グループ'),
'useDefaultValue' => false
];
Configure::write('BcCustomContent.fieldTypes', $types);

//対象メソッドをコール
$rs = $this->CustomFieldsService->getFieldTypes();
//戻る値を確認
Expand Down

0 comments on commit e1f2341

Please sign in to comment.