/**
  * Test decodeFile function returns proper result
  * when data format hasn't been set
  * and decoder must recognize format by file extension.
  */
 public function testDecodeFileWhenDataFormatIsNotSet()
 {
     $expectedResult = array("<FORMAT DECODED DATA>Dummy data</FORMAT DECODED DATA>");
     $dataFilePath = self::$dataFileFixturesHelper->buildEncodedFilePath('data.format');
     $actualResult = $this->datafileDecoder->decodeFile($dataFilePath);
     $this->assertEquals($expectedResult, $actualResult);
 }
 /**
  * Test encodeFile function returns proper result
  * when data format hasn't been set
  * and encoder must recognize format by file extension.
  */
 public function testEncodeFileWhenDataFormatIsNotSet()
 {
     $expectedResult = "<FORMAT ENCODED DATA>Dummy data</FORMAT ENCODED DATA>";
     $dataFilePath = self::$dataFileFixturesHelper->buildCreatedFilePath('data.format');
     $this->datafileEncoder->encodeFile(array('Dummy data'), $dataFilePath);
     $actualResult = file_get_contents($dataFilePath);
     $this->assertEquals($expectedResult, $actualResult);
 }
 /**
  * This method is called before the first test of this test class is run.
  */
 public static function setUpBeforeClass()
 {
     self::$dataFileFixturesHelper = new DataFileFixturesHelper();
     self::$dataFileFixturesHelper->setDataFormat(self::DATA_FORMAT_YAML);
 }