From 0e36d4efe7100d58513c23cae8666a22183ec26b Mon Sep 17 00:00:00 2001 From: thangnn Date: Thu, 16 May 2024 13:33:26 +0700 Subject: [PATCH] unitTest_BcUploaderPlugin_services --- plugins/bc-uploader/src/BcUploaderPlugin.php | 1 + .../tests/TestCase/BcUploaderPluginTest.php | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 plugins/bc-uploader/tests/TestCase/BcUploaderPluginTest.php diff --git a/plugins/bc-uploader/src/BcUploaderPlugin.php b/plugins/bc-uploader/src/BcUploaderPlugin.php index 331ebd0ced..2c8672f106 100644 --- a/plugins/bc-uploader/src/BcUploaderPlugin.php +++ b/plugins/bc-uploader/src/BcUploaderPlugin.php @@ -32,6 +32,7 @@ class BcUploaderPlugin extends BcPlugin * @param ContainerInterface $container * @noTodo * @checked + * @UnitTest */ public function services(ContainerInterface $container): void { diff --git a/plugins/bc-uploader/tests/TestCase/BcUploaderPluginTest.php b/plugins/bc-uploader/tests/TestCase/BcUploaderPluginTest.php new file mode 100644 index 0000000000..2c82c85a6d --- /dev/null +++ b/plugins/bc-uploader/tests/TestCase/BcUploaderPluginTest.php @@ -0,0 +1,45 @@ +BcUploader = $plugins->create('BcUploader'); + $plugins->add($this->BcUploader); + } + + public function tearDown(): void + { + unset($this->BcUploader); + parent::tearDown(); + } + + public function test_services() + { + $container = new Container(); + $this->BcUploader->services($container); + $this->assertTrue($container->has(UploaderCategoriesServiceInterface::class)); + $this->assertTrue($container->has(UploaderConfigsServiceInterface::class)); + $this->assertTrue($container->has(UploaderFilesServiceInterface::class)); + $this->assertTrue($container->has(UploaderFilesAdminServiceInterface::class)); + } + + public function test_routes() + { + $this->markTestIncomplete('このテストは、まだ実装されていません。'); + } +} \ No newline at end of file