objectManager = Bootstrap::getObjectManager(); $this->authentication = $this->objectManager->get(AuthenticationInterface::class); } /** * @magentoDataFixture Magento/Customer/_files/expired_lock_for_customer.php * * @return void */ public function testCustomerAuthenticate(): void { $this->assertTrue($this->authentication->authenticate(1, 'password')); } /** * @magentoDataFixture Magento/Customer/_files/expired_lock_for_customer.php * * @return void */ public function testCustomerAuthenticateWithWrongPassword(): void { $this->expectExceptionObject(new InvalidEmailOrPasswordException(__('Invalid login or password.'))); $this->authentication->authenticate(1, 'password1'); } }