-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
thangnn
committed
May 16, 2024
1 parent
74b7c6f
commit 0e36d4e
Showing
2 changed files
with
46 additions
and
0 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
45 changes: 45 additions & 0 deletions
45
plugins/bc-uploader/tests/TestCase/BcUploaderPluginTest.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,45 @@ | ||
<?php | ||
|
||
namespace BcUploader\Test\TestCase; | ||
|
||
use BaserCore\TestSuite\BcTestCase; | ||
use BaserCore\Utility\BcUtil; | ||
use BcUploader\Service\Admin\UploaderFilesAdminServiceInterface; | ||
use BcUploader\Service\UploaderCategoriesServiceInterface; | ||
use BcUploader\Service\UploaderConfigsServiceInterface; | ||
use BcUploader\Service\UploaderFilesServiceInterface; | ||
use Cake\Core\Container; | ||
use Cake\Core\Plugin; | ||
|
||
class BcUploaderPluginTest extends BcTestCase | ||
{ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
BcUtil::includePluginClass('BcUploader'); | ||
$plugins = Plugin::getCollection(); | ||
$this->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('このテストは、まだ実装されていません。'); | ||
} | ||
} |