public static function ordersFromFile(FileStoreFile $file)
 {
     $ordersEl = new SimpleXMLElement($file->getContents());
     $orders = self::ordersFromXml($ordersEl);
     foreach ($orders as $order) {
         $order->setSourceFile($file);
     }
     return $orders;
 }
 public function testHash()
 {
     $fs1 = new LocalFileStore('/tmp');
     $fs2 = new LocalFileStore('/tmp');
     $file = new FileStoreFile($fs1, 'a');
     $sameStoreSameName = new FileStoreFile($fs1, 'a');
     $differentStoreSameName = new FileStoreFile($fs2, 'a');
     $this->assertEquals($file->hash(), $file->hash());
     $this->assertEquals($file->hash(), $sameStoreSameName->hash());
     $this->assertNotEquals($file->hash(), $differentStoreSameName->hash());
 }