forked from baserproject/basercms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Đỗ Văn Hùng <HungDV2022>
- Loading branch information
1 parent
34b3f8a
commit 9c67f41
Showing
4 changed files
with
544 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
plugins/bc-custom-content/tests/Factory/CustomEntryFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 []; | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.