Пример #1
0
 /**
  * @param DataObject $storeInfo
  * @param $type
  * @dataProvider formatDataProvider
  */
 public function testFormat(DataObject $storeInfo, $type)
 {
     $expected = implode("\n", $storeInfo->getData());
     if ($type === 'html') {
         $expected = nl2br($expected);
     }
     $result = $this->model->format($storeInfo, $type);
     $this->assertEquals($expected, $result);
 }
Пример #2
0
 /**
  * Retrieve formatted store address from config
  *
  * @param Store $store
  * @return string
  */
 public function getFormattedAddress(Store $store)
 {
     return $this->renderer->format($this->getStoreInformationObject($store));
 }