diff --git a/plugins/baser-core/src/Controller/AnalyseController.php b/plugins/baser-core/src/Controller/AnalyseController.php index a9d174a054..f0a9a7f45b 100644 --- a/plugins/baser-core/src/Controller/AnalyseController.php +++ b/plugins/baser-core/src/Controller/AnalyseController.php @@ -11,7 +11,6 @@ namespace BaserCore\Controller; -use Cake\Core\Plugin; use Cake\Filesystem\File; use Cake\Filesystem\Folder; use Doctrine\Common\Annotations\AnnotationReader; @@ -58,7 +57,7 @@ public function index($pluginName = null) { $basePath = ROOT . DS . 'plugins' . DS; - $plugin = new \BcCustomContent\Plugin(); + $plugin = new \BcCustomContent\BcCustomContentPlugin(); $plugin->loadPlugin(); if ($pluginName) { diff --git a/plugins/baser-core/tests/TestCase/PluginTest.php b/plugins/baser-core/tests/TestCase/PluginTest.php index 837463f581..c39364721d 100644 --- a/plugins/baser-core/tests/TestCase/PluginTest.php +++ b/plugins/baser-core/tests/TestCase/PluginTest.php @@ -12,7 +12,7 @@ namespace BaserCore\Test\TestCase; use App\Application; -use BaserCore\Plugin; +use BaserCore\BaserCorePlugin; use BaserCore\Service\SiteConfigsServiceInterface; use BaserCore\TestSuite\BcTestCase; use BaserCore\Utility\BcUtil; @@ -27,12 +27,12 @@ /** * Class PluginTest - * @property Plugin $Plugin + * @property BaserCorePlugin $Plugin */ class PluginTest extends BcTestCase { /** - * @var Plugin + * @var BaserCorePlugin */ public $Plugin; @@ -59,7 +59,7 @@ public function setUp(): void { parent::setUp(); $this->application = new Application(CONFIG); - $this->Plugin = new Plugin(['name' => 'BaserCore']); + $this->Plugin = new BaserCorePlugin(['name' => 'BaserCore']); } /** diff --git a/plugins/baser-core/tests/TestCase/Service/ThemesServiceTest.php b/plugins/baser-core/tests/TestCase/Service/ThemesServiceTest.php index cf01e911c3..d98ec1bb5a 100644 --- a/plugins/baser-core/tests/TestCase/Service/ThemesServiceTest.php +++ b/plugins/baser-core/tests/TestCase/Service/ThemesServiceTest.php @@ -121,12 +121,12 @@ public function test_add() ); $rs = $this->ThemesService->add(["file" => $files]); - $this->assertEquals('BcPluginSample22', $rs); + $this->assertEquals('BcPluginSample3', $rs); //テスト実行後不要ファイルを削除 $folder = new Folder(); $folder->delete(ROOT . DS . 'plugins' . DS . $theme); - $folder->delete(ROOT . DS . 'plugins' . DS . 'BcPluginSample22'); + $folder->delete(ROOT . DS . 'plugins' . DS . 'BcPluginSample3'); $folder->delete($zipSrcPath); // 失敗した場合の Exception メッセージ diff --git a/plugins/baser-core/tests/TestCase/TestSuite/BcTestCaseTest.php b/plugins/baser-core/tests/TestCase/TestSuite/BcTestCaseTest.php index ac7c2beedd..27f054f0e7 100644 --- a/plugins/baser-core/tests/TestCase/TestSuite/BcTestCaseTest.php +++ b/plugins/baser-core/tests/TestCase/TestSuite/BcTestCaseTest.php @@ -73,7 +73,7 @@ public function testSetup() $this->assertEquals('App\Application', get_class($this->Application)); $plugins = $this->Application->getPlugins(); $this->assertTrue($plugins->has('BaserCore')); - $this->assertEquals('BaserCore\Plugin', get_class($this->BaserCore)); + $this->assertEquals('BaserCore\BaserCorePlugin', get_class($this->BaserCore)); } /** diff --git a/plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php b/plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php index ee8f40ea5a..41ee792ccb 100644 --- a/plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php +++ b/plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php @@ -12,12 +12,10 @@ namespace BaserCore\Test\TestCase\Utility; use BaserCore\Event\BcEventListener; -use BaserCore\Model\Entity\SiteConfig; use BaserCore\Test\Factory\SiteConfigFactory; use BaserCore\Test\Factory\UserFactory; use BaserCore\Test\Factory\UserGroupFactory; use BaserCore\Test\Factory\UsersUserGroupFactory; -use BaserCore\View\BcAdminAppView; use Cake\Core\App; use Cake\Cache\Cache; use Cake\Core\Plugin; @@ -27,7 +25,6 @@ use Cake\Filesystem\Folder; use BaserCore\Utility\BcUtil; use BaserCore\TestSuite\BcTestCase; -use Cake\Http\ServerRequestFactory; use Cake\Http\Session; use Cake\ORM\TableRegistry; use Cake\Routing\Router; @@ -1311,7 +1308,7 @@ public function test_changePluginNameSpace() // 対象ファイルをopen $theme = 'BcFront'; $pluginPath = BcUtil::getPluginPath($theme); - $file = new File($pluginPath . 'src' . DS . 'Plugin.php'); + $file = new File($pluginPath . 'src' . DS . 'BcFrontPlugin.php'); // テーマ名とネームスペースが違う状態を作る $data = $file->read(); $file->write(preg_replace('/namespace .+?;/', 'namespace WrongNamespace;', $data));