/** * @param string $expectedResult * @param bool $value * @dataProvider getAccountLockDataProvider * @return void */ public function testGetAccountLock($expectedResult, $value) { $this->customerRegistry->expects($this->once())->method('retrieve')->willReturn($this->customerModel); $this->customerModel->expects($this->once())->method('isCustomerLocked')->willReturn($value); $expectedResult = new \Magento\Framework\Phrase($expectedResult); $this->assertEquals($expectedResult, $this->block->getAccountLock()); }
/** * @param string $result * @param string|null $lastLoginAt * @dataProvider getStoreLastLoginDateDataProvider * @return void */ public function testGetStoreLastLoginDate($result, $lastLoginAt) { $this->customerLog->expects($this->once())->method('getLastLoginAt')->willReturn($lastLoginAt); $this->localeDate->expects($this->any())->method('scopeDate')->will($this->returnValue($lastLoginAt)); $this->localeDate->expects($this->any())->method('formatDateTime')->willReturn($lastLoginAt); $this->assertEquals($result, $this->block->getStoreLastLoginDate()); }
public function testGetBillingAddressHtmlNoDefaultAddress() { $this->_createCustomer(); $this->assertEquals(__('The customer does not have default billing address.'), $this->_block->getBillingAddressHtml()); }