/** * Form data has not been set on the block, but there is customer data from the customer session. * The customer data is something other than 'region_id' so that code path is skipped. */ public function testGetFormDataNullFormDataCustomerFormData() { $data = new \Magento\Framework\DataObject(); $data->setFirstname('John'); $data->setCustomerData(1); $customerFormData = ['firstname' => 'John']; $this->_customerSession->expects($this->once())->method('getCustomerFormData')->will($this->returnValue($customerFormData)); $this->assertEquals($data, $this->_block->getFormData()); $this->assertEquals($data, $this->_block->getData(self::FORM_DATA)); }