From 4e9b69e5545d9d00a256fafbb80219d210647a15 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 6 Jan 2019 17:46:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?PluginsRole=E3=81=AE=E3=82=AF=E3=82=A8?= =?UTF-8?q?=E3=83=AA=E7=B5=90=E6=9E=9C=E3=82=92=E3=82=AD=E3=83=A3=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F=E3=81=93=E3=81=A8=E3=81=AB?= =?UTF-8?q?=E3=82=88=E3=82=8B=E6=94=B9=E4=BF=AE=20https://github.com/NetCo?= =?UTF-8?q?mmons3/NetCommons3/issues/1337?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/UserRoleAddController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/UserRoleAddController.php b/Controller/UserRoleAddController.php index a3737c6..507527b 100644 --- a/Controller/UserRoleAddController.php +++ b/Controller/UserRoleAddController.php @@ -126,7 +126,7 @@ public function user_role() { //登録処理 if ($this->UserRole->validateUserRole($this->request->data)) { $this->Session->write('UserRoleAdd', $this->request->data); - $count = $this->PluginsRole->find('count', array( + $count = $this->PluginsRole->cacheFindQuery('count', array( 'recursive' => -1, 'conditions' => array( 'role_key' => $this->request->data['UserRoleSetting']['origin_role_key'] From fbbf1ad8dbfc182d56fe28598fb7954711b8a0db Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 6 Jan 2019 22:04:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?phpunit=E3=82=A8=E3=83=A9=E3=83=BC=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test/Case/View/Elements/UserRoles/EditFormTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Test/Case/View/Elements/UserRoles/EditFormTest.php b/Test/Case/View/Elements/UserRoles/EditFormTest.php index 301888a..13945c7 100644 --- a/Test/Case/View/Elements/UserRoles/EditFormTest.php +++ b/Test/Case/View/Elements/UserRoles/EditFormTest.php @@ -10,6 +10,7 @@ */ App::uses('UserRolesNetCommonsControllerTestCase', 'UserRoles.TestSuite'); +App::uses('TestAuthGeneral', 'AuthGeneral.TestSuite'); /** * View/Elements/UserRoles/edit_formのテスト @@ -38,6 +39,9 @@ public function setUp() { NetCommonsCakeTestCase::loadTestPlugin($this, 'UserRoles', 'TestUserRoles'); //テストコントローラ生成 $this->generateNc('TestUserRoles.TestViewElementsUserRolesEditForm'); + + //ログイン + TestAuthGeneral::login($this); } /**