Skip to content

Commit

Permalink
fix baserproject#1995 API エントリー管理 単一データ取得 (baserproject#2002)
Browse files Browse the repository at this point in the history
Co-authored-by: Đỗ Văn Hùng <HungDV2022>
  • Loading branch information
HungDV2022 committed Mar 13, 2023
1 parent 34b3f8a commit 9c67f41
Show file tree
Hide file tree
Showing 4 changed files with 544 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class CustomEntriesController extends BcApiController
* @param CustomEntriesServiceInterface $service
* @param int $tableId
* @param $id
*
* @checked
* @noTodo
* @unitTest
*/
public function view(CustomEntriesServiceInterface $service, $id)
{
Expand Down
48 changes: 48 additions & 0 deletions plugins/bc-custom-content/tests/Factory/CustomEntryFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);

/**
* baserCMS : Based Website Development Project <https://basercms.net>
* Copyright (c) NPO baser foundation <https://baserfoundation.org/>
*
* @copyright Copyright (c) NPO baser foundation
* @link https://basercms.net baserCMS Project
* @since 5.0.0
* @license https://basercms.net/license/index.html MIT License
*/

namespace BcCustomContent\Test\Factory;

use CakephpFixtureFactories\Factory\BaseFactory as CakephpBaseFactory;
use Faker\Generator;

/**
* CustomEntryFactory
*/
class CustomEntryFactory extends CakephpBaseFactory
{

/**
* Defines the Table Registry used to generate entities with
*
* @return string
*/
protected function getRootTableRegistryName(): string
{
return 'custom_entry_1_recruit_categories';
}

/**
* Defines the factory's default values. This is useful for
* not nullable fields. You may use methods of the present factory here too.
*
* @return void
*/
protected function setDefaultTemplate(): void
{
$this->setDefaultData(function (Generator $faker) {
return [];
});
}

}

0 comments on commit 9c67f41

Please sign in to comment.