Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BcCustomContentControllerEventListener::startup()&setAdminMenu() のユニットテスト #4026

Conversation

HungDV2022
Copy link
Collaborator

No description provided.

@HungDV2022
Copy link
Collaborator Author

レビューをお願いします。

Copy link
Collaborator

@ryuring ryuring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 こちらの件、不要なコードが多くありそうですので、不要なコードを削除して整理してもらえますか?

テストの内容としては、dispatch() して、Configure::read('BcApp.adminNavigation.Contents') に期待する値が入ればOKです。

$dataBaseService = $this->getService(BcDatabaseServiceInterface::class);
$customTable = $this->getService(CustomTablesServiceInterface::class);
//カスタムテーブルとカスタムエントリテーブルを生成
$customTable->create([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 このデータは使われてますか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryuring
このデータは必要です。削除したらカスタムコンテンツをAdminMenuに反映しませんでした。

$this->loadFixtureScenario(InitAppScenario::class);
$this->eventManager = EventManager::instance();

$this->BcAuthenticationEventListener = new BcCustomContentControllerEventListener();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HungDV2022 変数名がおかしくないですか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すみません。修正しました。

@ryuring ryuring assigned HungDV2022 and unassigned ryuring Nov 20, 2024
@ryuring ryuring added the Reviewed レビュー済 label Nov 20, 2024
@HungDV2022 HungDV2022 merged commit ccf6124 into baserproject:5.1.x Nov 22, 2024
1 check passed
@ryuring
Copy link
Collaborator

ryuring commented Nov 22, 2024

@HungDV2022 ありがとうございました。

@momofff momofff added this to the 5.1.4 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed レビュー済
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants