/**
  * Test encodeFile encodes data properly
  * and saves it to the proper file.
  */
 public function testEncodeFile()
 {
     $dataFilePath = self::$dataFileFixturesHelper->buildCreatedFilePath('data.yaml');
     $data = self::$dataFileFixturesHelper->loadDecodedData();
     $this->yamlDatafileEncoder->encodeFile($data, $dataFilePath);
     $expectedResult = self::$dataFileFixturesHelper->loadEncodedData();
     $actualResult = file_get_contents($dataFilePath);
     $this->assertEquals($expectedResult, $actualResult);
 }
 /**
  * Test decodeFile function properly decodes file data
  * with YAML format.
  */
 public function testDecodeFile()
 {
     $dataFilePath = self::$dataFileFixturesHelper->buildEncodedFilePath('data.yaml');
     $expectedResult = self::$dataFileFixturesHelper->loadDecodedData();
     $actualResult = $this->yamlDatafileDecoder->decodeFile($dataFilePath);
     $this->assertEquals($expectedResult, $actualResult);
 }