コード例 #1
0
 public function testGetStoreLabelWithException()
 {
     $this->customerMetadata->expects($this->any())->method('getAttributeMetadata')->will($this->throwException(new NoSuchEntityException(NoSuchEntityException::MESSAGE_SINGLE_FIELD, ['fieldName' => 'field', 'fieldValue' => 'value'])));
     $this->assertSame('', $this->_block->getStoreLabel('attributeCode'));
 }
コード例 #2
0
ファイル: NameTest.php プロジェクト: Doability/magento2dev
 public function testGetStoreLabelWithException()
 {
     $this->customerMetadata->expects($this->any())->method('getAttributeMetadata')->will($this->throwException(new NoSuchEntityException(__('No such entity with %fieldName = %fieldValue', ['fieldName' => 'field', 'fieldValue' => 'value']))));
     $this->assertSame('', (string) $this->_block->getStoreLabel('attributeCode'));
 }