49 $updater = $updater =
new Updater();
51 $input = [
'file' =>
'Hello World!' ];
52 $output = [
'en' => [
'key' => $input[
'file'] ] ];
54 $reader = $this->getMock(
'LocalisationUpdate\Reader' );
56 ->expects( $this->once() )
58 ->will( $this->returnValue( $output ) );
60 $factory = $this->getMock(
'LocalisationUpdate\ReaderFactory' );
62 ->expects( $this->once() )
63 ->method(
'getReader' )
64 ->will( $this->returnValue( $reader ) );
66 $observed = $updater->readMessages( $factory, $input );
67 $this->assertEquals( $output, $observed,
'Tries to parse given file' );