/**
  * 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);
 }