Exemple #1
0
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testNotReadOnly()
 {
     $this->backendSession->setCustomerData(array('customer_id' => 1, 'account' => $this->customerAccountService->getCustomer(1)->__toArray()));
     $this->accountBlock->initForm()->toHtml();
     $element = $this->accountBlock->getForm()->getElement('firstname');
     // Make sure readonly has not been set (is null) or set to false
     $this->assertTrue(is_null($element->getReadonly()) || !$element->getReadonly());
 }
Exemple #2
0
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testNotReadOnly()
 {
     /** @var \Magento\Customer\Api\Data\CustomerInterface $customer */
     $customer = $this->customerRepository->getById(1);
     $customerData = $this->dataObjectProcessor->buildOutputDataArray($customer, get_class($customer));
     $this->backendSession->setCustomerData(['customer_id' => 1, 'account' => $customerData]);
     $this->accountBlock->initForm()->toHtml();
     $element = $this->accountBlock->getForm()->getElement('firstname');
     // Make sure readonly has not been set (is null) or set to false
     $this->assertTrue($element->getReadonly() === null || !$element->getReadonly());
 }