diff --git a/codeception/acceptance/EF04CustomerCest.php b/codeception/acceptance/EF04CustomerCest.php
index aa12403f300..ff3eb7cca2d 100644
--- a/codeception/acceptance/EF04CustomerCest.php
+++ b/codeception/acceptance/EF04CustomerCest.php
@@ -25,6 +25,8 @@ class EF04CustomerCest
*/
public function customer_会員登録正常(AcceptanceTester $I)
{
+ $I->getScenario()->incomplete('4.2.0-betaではスキップ');
+
$I->wantTo('EF0401-UC01-T01 会員登録 正常パターン');
$I->amOnPage('/entry');
$faker = Fixtures::get('faker');
@@ -50,7 +52,7 @@ public function customer_会員登録正常(AcceptanceTester $I)
'entry[user_policy_check]' => '1',
];
$findPluginByCode = Fixtures::get('findPluginByCode');
- $Plugin = $findPluginByCode('MailMagazine');
+ $Plugin = $findPluginByCode('MailMagazine42');
if ($Plugin) {
$I->amGoingTo('メルマガプラグインを発見したため、メルマガを購読します');
$form['entry[mailmaga_flg]'] = '1';
@@ -102,6 +104,7 @@ public function customer_会員登録正常(AcceptanceTester $I)
public function customer_会員登録異常1(AcceptanceTester $I)
{
+ $I->getScenario()->incomplete('4.2.0-betaではスキップ');
$I->wantTo('EF0401-UC01-T02 会員登録 異常パターン 重複');
$I->amOnPage('/entry');
diff --git a/src/Eccube/Controller/EntryController.php b/src/Eccube/Controller/EntryController.php
index 8a411d597ab..b8d0c2752fd 100644
--- a/src/Eccube/Controller/EntryController.php
+++ b/src/Eccube/Controller/EntryController.php
@@ -14,6 +14,7 @@
namespace Eccube\Controller;
use Eccube\Entity\BaseInfo;
+use Eccube\Entity\Customer;
use Eccube\Entity\Master\CustomerStatus;
use Eccube\Event\EccubeEvents;
use Eccube\Event\EventArgs;
@@ -168,39 +169,57 @@ public function index(Request $request)
case 'complete':
log_info('会員登録開始');
- $encoder = $this->encoderFactory->getEncoder($Customer);
- $salt = $encoder->createSalt();
- $password = $encoder->encodePassword($Customer->getPlainPassword(), $salt);
- $secretKey = $this->customerRepository->getUniqueSecretKey();
-
- $Customer
- ->setSalt($salt)
- ->setPassword($password)
- ->setSecretKey($secretKey)
- ->setPoint(0);
-
- $this->entityManager->persist($Customer);
- $this->entityManager->flush();
+ $existCustomer = $this->customerRepository->findOneBy([
+ 'email' => $Customer->getEmail(),
+ 'Status' => [
+ CustomerStatus::PROVISIONAL,
+ CustomerStatus::REGULAR,
+ ]
+ ]);
- log_info('会員登録完了');
+ if ($existCustomer) {
+ log_info('会員登録済のため登録処理をスキップ');
+ } else {
+ log_info('会員登録を実行');
+
+ $encoder = $this->encoderFactory->getEncoder($Customer);
+ $salt = $encoder->createSalt();
+ $password = $encoder->encodePassword($Customer->getPlainPassword(), $salt);
+ $secretKey = $this->customerRepository->getUniqueSecretKey();
+
+ $Customer
+ ->setSalt($salt)
+ ->setPassword($password)
+ ->setSecretKey($secretKey)
+ ->setPoint(0);
+
+ $this->entityManager->persist($Customer);
+ $this->entityManager->flush();
+
+ log_info('会員登録完了');
+
+ $event = new EventArgs(
+ [
+ 'form' => $form,
+ 'Customer' => $Customer,
+ ],
+ $request
+ );
+ }
- $event = new EventArgs(
- [
- 'form' => $form,
- 'Customer' => $Customer,
- ],
- $request
- );
$this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_ENTRY_INDEX_COMPLETE);
- $activateFlg = $this->BaseInfo->isOptionCustomerActivate();
+ // 会員登録済の場合は既存のsecret_keyを利用
+ $secretKey = $existCustomer ? $existCustomer->getSecretKey() : $Customer->getSecretKey();
// 仮会員設定が有効な場合は、確認メールを送信し完了画面表示.
- if ($activateFlg) {
- $activateUrl = $this->generateUrl('entry_activate', ['secret_key' => $Customer->getSecretKey()], UrlGeneratorInterface::ABSOLUTE_URL);
+ if ($this->BaseInfo->isOptionCustomerActivate()) {
+ log_info('仮会員設定が有効');
+
+ $activateUrl = $this->generateUrl('entry_activate', ['secret_key' => $secretKey], UrlGeneratorInterface::ABSOLUTE_URL);
// メール送信
- $this->mailService->sendCustomerConfirmMail($Customer, $activateUrl);
+ $this->mailService->sendCustomerConfirmMail($Customer, $activateUrl, $existCustomer);
if ($event->hasResponse()) {
return $event->getResponse();
@@ -210,14 +229,31 @@ public function index(Request $request)
return $this->redirectToRoute('entry_complete');
} else {
- // 仮会員設定が無効な場合は、会員登録を完了させる.
- $qtyInCart = $this->entryActivate($request, $Customer->getSecretKey());
-
- // URLを変更するため完了画面にリダイレクト
- return $this->redirectToRoute('entry_activate', [
- 'secret_key' => $Customer->getSecretKey(),
- 'qtyInCart' => $qtyInCart,
- ]);
+ log_info('仮会員設定が無効');
+
+ if ($existCustomer) {
+ // 会員登録済の場合はメール通知のみ
+ $this->mailService->sendCustomerCompleteMail($Customer, $existCustomer);
+
+ log_info('会員登録完了画面へリダイレクト');
+
+ return $this->redirectToRoute('entry_activate_complete', [
+ 'qtyInCart' => $this->getQuantityInCart(),
+ ]);
+ } else {
+ // 本会員として更新
+ $this->updateRegularCustomer($Customer);
+ // ログイン済へ変更
+ $this->doLogin($Customer, $request);
+ // メール通知
+ $this->mailService->sendCustomerCompleteMail($Customer);
+
+ log_info('会員登録完了画面へリダイレクト');
+
+ return $this->redirectToRoute('entry_activate_complete', [
+ 'qtyInCart' => $this->getQuantityInCart(),
+ ]);
+ }
}
}
}
@@ -228,7 +264,7 @@ public function index(Request $request)
}
/**
- * 会員登録完了画面.
+ * 会員登録完了画面(仮会員).
*
* @Route("/entry/complete", name="entry_complete", methods={"GET"})
* @Template("Entry/complete.twig")
@@ -241,10 +277,9 @@ public function complete()
/**
* 会員のアクティベート(本会員化)を行う.
*
- * @Route("/entry/activate/{secret_key}/{qtyInCart}", name="entry_activate", methods={"GET"})
- * @Template("Entry/activate.twig")
+ * @Route("/entry/activate/{secret_key}", name="entry_activate", methods={"GET"})
*/
- public function activate(Request $request, $secret_key, $qtyInCart = null)
+ public function activate(Request $request, $secret_key)
{
$errors = $this->recursiveValidator->validate(
$secret_key,
@@ -258,74 +293,83 @@ public function activate(Request $request, $secret_key, $qtyInCart = null)
]
);
- if (!is_null($qtyInCart)) {
- return [
- 'qtyInCart' => $qtyInCart,
- ];
- } elseif ($request->getMethod() === 'GET' && count($errors) === 0) {
- // 会員登録処理を行う
- $qtyInCart = $this->entryActivate($request, $secret_key);
-
- return [
- 'qtyInCart' => $qtyInCart,
- ];
+ if (count($errors) === 0) {
+ $Customer = $this->customerRepository->getProvisionalCustomerBySecretKey($secret_key);
+ if (null === $Customer) {
+ throw new HttpException\NotFoundHttpException();
+ }
+
+ // 本会員として更新
+ $this->updateRegularCustomer($Customer);
+ // ログイン済へ変更
+ $this->doLogin($Customer, $request);
+ // メール通知
+ $this->mailService->sendCustomerCompleteMail($Customer);
+
+ return $this->redirectToRoute('entry_activate_complete', [
+ 'qtyInCart' => $this->getQuantityInCart(),
+ ]);
}
throw new HttpException\NotFoundHttpException();
}
/**
- * 会員登録処理を行う
- *
- * @param Request $request
- * @param $secret_key
+ * 会員登録完了画面(本会員).
*
- * @return \Eccube\Entity\Cart|mixed
+ * @Route("/entry/activate_complete", name="entry_activate_complete", methods={"GET"})
+ * @Template("Entry/activate.twig")
*/
- private function entryActivate(Request $request, $secret_key)
+ public function activate_complete(Request $request)
{
- log_info('本会員登録開始');
- $Customer = $this->customerRepository->getProvisionalCustomerBySecretKey($secret_key);
- if (is_null($Customer)) {
- throw new HttpException\NotFoundHttpException();
- }
-
- $CustomerStatus = $this->customerStatusRepository->find(CustomerStatus::REGULAR);
- $Customer->setStatus($CustomerStatus);
- $this->entityManager->persist($Customer);
- $this->entityManager->flush();
-
- log_info('本会員登録完了');
-
- $event = new EventArgs(
- [
- 'Customer' => $Customer,
- ],
- $request
- );
- $this->eventDispatcher->dispatch($event, EccubeEvents::FRONT_ENTRY_ACTIVATE_COMPLETE);
-
- // メール送信
- $this->mailService->sendCustomerCompleteMail($Customer);
+ return ['qtyInCart' => $request->query->get('qtyInCart')];
+ }
- // Assign session carts into customer carts
+ /**
+ * カート内の登録数を取得する.
+ *
+ * @return int
+ */
+ private function getQuantityInCart(): int
+ {
$Carts = $this->cartService->getCarts();
$qtyInCart = 0;
foreach ($Carts as $Cart) {
$qtyInCart += $Cart->getTotalQuantity();
}
- // 本会員登録してログイン状態にする
- $token = new UsernamePasswordToken($Customer, null, 'customer', ['ROLE_USER']);
- $this->tokenStorage->setToken($token);
- $request->getSession()->migrate(true);
-
if ($qtyInCart) {
$this->cartService->save();
}
- log_info('ログイン済に変更', [$this->getUser()->getId()]);
-
return $qtyInCart;
}
+
+ /**
+ * ログイン状態に更新する.
+ *
+ * @param Customer $Customer
+ * @param Request $request
+ * @return void
+ */
+ private function doLogin(Customer $Customer, Request $request): void
+ {
+ $token = new UsernamePasswordToken($Customer, null, 'customer', ['ROLE_USER']);
+ $this->tokenStorage->setToken($token);
+ $request->getSession()->migrate(true);
+ }
+
+ /**
+ * 本会員へ更新する.
+ *
+ * @param Customer $Customer
+ * @return void
+ */
+ private function updateRegularCustomer(Customer $Customer): void
+ {
+ $CustomerStatus = $this->customerStatusRepository->find(CustomerStatus::REGULAR);
+ $Customer->setStatus($CustomerStatus);
+ $this->entityManager->persist($Customer);
+ $this->entityManager->flush();
+ }
}
diff --git a/src/Eccube/Entity/Customer.php b/src/Eccube/Entity/Customer.php
index bfe689e074e..92130d9e47d 100644
--- a/src/Eccube/Entity/Customer.php
+++ b/src/Eccube/Entity/Customer.php
@@ -332,16 +332,6 @@ public function eraseCredentials()
{
}
- // TODO: できればFormTypeで行いたい
- public static function loadValidatorMetadata(ClassMetadata $metadata)
- {
- $metadata->addConstraint(new UniqueEntity([
- 'fields' => 'email',
- 'message' => 'form_error.customer_already_exists',
- 'repositoryMethod' => 'getNonWithdrawingCustomers',
- ]));
- }
-
/**
* Get id.
*
diff --git a/src/Eccube/Form/Type/Admin/CustomerType.php b/src/Eccube/Form/Type/Admin/CustomerType.php
index 3264020fdaa..5b7a47783d3 100644
--- a/src/Eccube/Form/Type/Admin/CustomerType.php
+++ b/src/Eccube/Form/Type/Admin/CustomerType.php
@@ -25,6 +25,7 @@
use Eccube\Form\Type\PostalType;
use Eccube\Form\Type\RepeatedPasswordType;
use Eccube\Form\Validator\Email;
+use Eccube\Repository\CustomerRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
@@ -45,14 +46,21 @@ class CustomerType extends AbstractType
*/
protected $eccubeConfig;
+ /**
+ * @var CustomerRepository
+ */
+ protected $customerRepository;
+
/**
* CustomerType constructor.
*
* @param EccubeConfig $eccubeConfig
+ * @param CustomerRepository $customerRepository
*/
- public function __construct(EccubeConfig $eccubeConfig)
+ public function __construct(EccubeConfig $eccubeConfig, CustomerRepository $customerRepository)
{
$this->eccubeConfig = $eccubeConfig;
+ $this->customerRepository = $customerRepository;
}
/**
@@ -150,6 +158,24 @@ public function buildForm(FormBuilderInterface $builder, array $options)
],
]);
+ $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
+ $form = $event->getForm();
+ /** @var Customer $Customer */
+ $Customer = $event->getData();
+ $qb = $this->customerRepository->createQueryBuilder('c');
+ $qb->select('count(c.id)')
+ ->where('c.email = :email')
+ ->setParameter('email', $Customer->getEmail());
+ if ($Customer->getId()) {
+ $qb->andWhere('c.id <> :id')
+ ->setParameter('id', $Customer->getId());
+ }
+ $count = $qb->getQuery()->getSingleScalarResult();
+ if ($count > 0) {
+ $form['email']->addError(new FormError(trans('form_error.customer_already_exists', [], 'validators')));
+ }
+ });
+
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
$form = $event->getForm();
/** @var Customer $Customer */
diff --git a/src/Eccube/Resource/doctrine/import_csv/ja/dtb_page.csv b/src/Eccube/Resource/doctrine/import_csv/ja/dtb_page.csv
index ede41f6fc6b..4f66c798644 100644
--- a/src/Eccube/Resource/doctrine/import_csv/ja/dtb_page.csv
+++ b/src/Eccube/Resource/doctrine/import_csv/ja/dtb_page.csv
@@ -18,7 +18,7 @@ id,page_name,url,file_name,edit_type,author,description,keyword,create_date,upda
"18","会員登録(入力ページ)","entry","Entry/index","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52",,,"page",
"20","会員登録(完了ページ)","entry_complete","Entry/complete","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52","noindex",,"page",
"21","特定商取引に関する法律に基づく表記","help_tradelaw","Help/tradelaw","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52",,,"page",
-"22","本会員登録(完了ページ)","entry_activate","Entry/activate","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52","noindex",,"page",
+"22","本会員登録(完了ページ)","entry_activate_complete","Entry/activate","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52","noindex",,"page",
"24","商品購入/お届け先の指定","shopping_shipping","Shopping/shipping","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52","noindex",,"page",
"28","商品購入/ご注文完了","shopping_complete","Shopping/complete","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52","noindex",,"page",
"29","プライバシーポリシー","help_privacy","Help/privacy","2",,,,"2017-03-07 10:14:52","2017-03-07 10:14:52",,,"page",
diff --git a/src/Eccube/Resource/template/default/Mail/entry_complete.html.twig b/src/Eccube/Resource/template/default/Mail/entry_complete.html.twig
index d1864f220ab..1ccfec372b3 100644
--- a/src/Eccube/Resource/template/default/Mail/entry_complete.html.twig
+++ b/src/Eccube/Resource/template/default/Mail/entry_complete.html.twig
@@ -32,11 +32,23 @@ file that was distributed with this source code.
{{ BaseInfo.shop_name }}でございます。
この度は会員登録依頼をいただきましてまことに有り難うございます。
+ {% if existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::REGULAR') %}{# 本会員登録済 #}
+ 入力いただきましたメールアドレスは、既に会員としてご登録いただいております。
+ マイページよりログイン頂き、会員情報をご確認ください。
+
+ {{ url('mypage') }}
+
+ パスワードがわからない場合は、パスワードの再発行をご利用ください。
+
+ {{ url('mypage') }}
+
+ {% else %}
ショッピングをお楽しみくださいませ。
今後ともどうぞ{{ BaseInfo.shop_name }}をよろしくお願い申し上げます。
+ {% endif %}
diff --git a/src/Eccube/Resource/template/default/Mail/entry_complete.twig b/src/Eccube/Resource/template/default/Mail/entry_complete.twig
index fb53e87da33..066b20d62be 100644
--- a/src/Eccube/Resource/template/default/Mail/entry_complete.twig
+++ b/src/Eccube/Resource/template/default/Mail/entry_complete.twig
@@ -26,8 +26,19 @@ file that was distributed with this source code.
この度は会員登録依頼をいただきましてまことに有り難うございます。
+{% if existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::REGULAR') %}{# 本会員登録済 #}
+入力いただきましたメールアドレスは、既に会員としてご登録いただいております。
+マイページよりログイン頂き、会員情報をご確認ください。
+
+{{ url('mypage') }}
+
+パスワードがわからない場合は、パスワードの再発行をご利用ください。
+
+{{ url('forgot') }}
+{% else %}
本会員登録が完了いたしました。
ショッピングをお楽しみくださいませ。
今後ともどうぞ{{ BaseInfo.shop_name }}をよろしくお願い申し上げます。
+{% endif %}
{% endautoescape %}
diff --git a/src/Eccube/Resource/template/default/Mail/entry_confirm.html.twig b/src/Eccube/Resource/template/default/Mail/entry_confirm.html.twig
index 32f2f53b393..54d4fbc23a7 100644
--- a/src/Eccube/Resource/template/default/Mail/entry_confirm.html.twig
+++ b/src/Eccube/Resource/template/default/Mail/entry_confirm.html.twig
@@ -31,14 +31,34 @@ file that was distributed with this source code.
{{ Customer.name01 }} {{ Customer.name02 }} 様
{{ BaseInfo.shop_name }}でございます。
- 現在は仮登録の状態です。
- 本会員登録を完了するには下記URLにアクセスしてください。
- {{ activateUrl }}
+ {% if existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::PROVISIONAL') %}{# 仮会員登録済 #}
+ 入力いただきましたメールアドレスは、現在仮登録の状態です。
+ 本会員登録を完了するには下記URLにアクセスしてください。
+ {{ activateUrl }}
- 上記URLにて本会員登録が完了いたしましたら改めてご登録内容ご確認メールをお送り致します。
+ 上記URLにて本会員登録が完了いたしましたら改めてご登録内容ご確認メールをお送り致します。
+ {% elseif existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::REGULAR') %}{# 本会員登録済 #}
+ 入力いただきましたメールアドレスは、既に会員としてご登録いただいております。
+ マイページよりログイン頂き、会員情報をご確認ください。
+ {{ url('mypage') }}
+
+ パスワードがわからない場合は、パスワードの再発行をご利用ください。
+
+ {{ url('mypage') }}
+
+ {% else %}
+ 現在は仮登録の状態です。
+
+ 本会員登録を完了するには下記URLにアクセスしてください。
+
+ {{ activateUrl }}
+
+ 上記URLにて本会員登録が完了いたしましたら改めてご登録内容ご確認メールをお送り致します。
+
+ {% endif %}
diff --git a/src/Eccube/Resource/template/default/Mail/entry_confirm.twig b/src/Eccube/Resource/template/default/Mail/entry_confirm.twig
index b4cdc738324..07b0348bdb8 100644
--- a/src/Eccube/Resource/template/default/Mail/entry_confirm.twig
+++ b/src/Eccube/Resource/template/default/Mail/entry_confirm.twig
@@ -27,6 +27,24 @@ file that was distributed with this source code.
この度は会員登録依頼をいただきまして、有り難うございます。
+{% if existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::PROVISIONAL') %}{# 仮会員登録済 #}
+入力いただきましたメールアドレスは、現在仮登録の状態です。
+本会員登録を完了するには下記URLにアクセスしてください。
+
+{{ activateUrl }}
+
+上記URLにて本会員登録が完了いたしましたら改めてご登録内容ご確認
+メールをお送り致します。
+{% elseif existCustomer is defined and existCustomer and existCustomer.status.id == constant('Eccube\\Entity\\Master\\CustomerStatus::REGULAR') %}{# 本会員登録済 #}
+入力いただきましたメールアドレスは、既に会員としてご登録いただいております。
+マイページよりログイン頂き、会員情報をご確認ください。
+
+{{ url('mypage') }}
+
+パスワードがわからない場合は、パスワードの再発行をご利用ください。
+
+{{ url('forgot') }}
+{% else %}
現在は仮登録の状態です。
~~~~~~
本会員登録を完了するには下記URLにアクセスしてください。
@@ -35,4 +53,5 @@ file that was distributed with this source code.
上記URLにて本会員登録が完了いたしましたら改めてご登録内容ご確認
メールをお送り致します。
+{% endif %}
{% endautoescape %}
diff --git a/src/Eccube/Service/MailService.php b/src/Eccube/Service/MailService.php
index 9f5182cb081..f429a767686 100644
--- a/src/Eccube/Service/MailService.php
+++ b/src/Eccube/Service/MailService.php
@@ -110,8 +110,9 @@ public function __construct(
*
* @param $Customer 会員情報
* @param string $activateUrl アクティベート用url
+ * @param Customer $existCustomer
*/
- public function sendCustomerConfirmMail(Customer $Customer, $activateUrl)
+ public function sendCustomerConfirmMail(Customer $Customer, $activateUrl, Customer $existCustomer = null)
{
log_info('仮会員登録メール送信開始');
@@ -121,6 +122,7 @@ public function sendCustomerConfirmMail(Customer $Customer, $activateUrl)
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
+ 'existCustomer' => $existCustomer,
]);
$message = (new Email())
@@ -138,6 +140,7 @@ public function sendCustomerConfirmMail(Customer $Customer, $activateUrl)
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
+ 'existCustomer' => $existCustomer,
]);
$message
@@ -169,8 +172,9 @@ public function sendCustomerConfirmMail(Customer $Customer, $activateUrl)
* Send customer complete mail.
*
* @param $Customer 会員情報
+ * @param Customer $existCustomer
*/
- public function sendCustomerCompleteMail(Customer $Customer)
+ public function sendCustomerCompleteMail(Customer $Customer, Customer $existCustomer = null)
{
log_info('会員登録完了メール送信開始');
@@ -178,6 +182,7 @@ public function sendCustomerCompleteMail(Customer $Customer)
$body = $this->twig->render($MailTemplate->getFileName(), [
'Customer' => $Customer,
+ 'existCustomer' => $existCustomer,
'BaseInfo' => $this->BaseInfo,
]);
@@ -194,6 +199,7 @@ public function sendCustomerCompleteMail(Customer $Customer)
if (!is_null($htmlFileName)) {
$htmlBody = $this->twig->render($htmlFileName, [
'Customer' => $Customer,
+ 'existCustomer' => $existCustomer,
'BaseInfo' => $this->BaseInfo,
]);
diff --git a/tests/Eccube/Tests/Web/EntryControllerTest.php b/tests/Eccube/Tests/Web/EntryControllerTest.php
index 00c218c25cb..c41e5e88a09 100644
--- a/tests/Eccube/Tests/Web/EntryControllerTest.php
+++ b/tests/Eccube/Tests/Web/EntryControllerTest.php
@@ -210,14 +210,14 @@ public function testActivate()
$BaseInfo = $this->entityManager->getRepository(\Eccube\Entity\BaseInfo::class)->get();
$Customer = $this->createCustomer();
$secret_key = $Customer->getSecretKey();
- $Status = $this->entityManager->getRepository('Eccube\Entity\Master\CustomerStatus')->find(CustomerStatus::NONACTIVE);
+ $Status = $this->entityManager->getRepository('Eccube\Entity\Master\CustomerStatus')->find(CustomerStatus::PROVISIONAL);
$Customer->setStatus($Status);
$this->entityManager->flush();
$client = $this->client;
$client->request('GET', $this->generateUrl('entry_activate', ['secret_key' => $secret_key]));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ $this->assertTrue($client->getResponse()->isRedirection());
$this->assertEmailCount(1);
/** @var Email $Message */
$Message = $this->getMailerMessage(0);
@@ -239,7 +239,7 @@ public function testActivateWithSanitize()
$client = $this->client;
$client->request('GET', $this->generateUrl('entry_activate', ['secret_key' => $secret_key]));
- $this->assertTrue($client->getResponse()->isSuccessful());
+ $this->assertTrue($client->getResponse()->isRedirection());
$this->assertEmailCount(1);
/** @var Email $Message */
$Message = $this->getMailerMessage(0);