44
55namespace FormatPHP \Test \Format \Reader ;
66
7- use FormatPHP \Config ;
87use FormatPHP \Exception \InvalidMessageShapeException ;
98use FormatPHP \Format \Reader \SmartlingReader ;
10- use FormatPHP \Intl \Locale ;
119use FormatPHP \MessageCollection ;
1210use FormatPHP \MessageInterface ;
1311use FormatPHP \Test \TestCase ;
@@ -18,7 +16,6 @@ class SmartlingReaderTest extends TestCase
1816{
1917 public function testThrowsExceptionWhenMessageIdIsNotAString (): void
2018 {
21- $ config = new Config (new Locale ('en ' ));
2219 $ formatReader = new SmartlingReader ();
2320 $ data = ['smartling ' => [], 'foo ' ];
2421
@@ -28,12 +25,11 @@ public function testThrowsExceptionWhenMessageIdIsNotAString(): void
2825 SmartlingReader::class,
2926 ));
3027
31- $ formatReader ($ config , $ data );
28+ $ formatReader ($ data );
3229 }
3330
3431 public function testThrowsExceptionWhenMessageIsNotAString (): void
3532 {
36- $ config = new Config (new Locale ('en ' ));
3733 $ formatReader = new SmartlingReader ();
3834 $ data = ['smartling ' => [], 'foo ' => ['bar ' ]];
3935
@@ -43,16 +39,15 @@ public function testThrowsExceptionWhenMessageIsNotAString(): void
4339 SmartlingReader::class,
4440 ));
4541
46- $ formatReader ($ config , $ data );
42+ $ formatReader ($ data );
4743 }
4844
4945 public function testInvoke (): void
5046 {
51- $ config = new Config (new Locale ('en-US ' ));
5247 $ formatReader = new SmartlingReader ();
5348 $ data = ['smartling ' => [], 'foo ' => ['message ' => 'I am foo ' ], 'bar ' => ['message ' => 'I am bar ' ]];
5449
55- $ collection = $ formatReader ($ config , $ data );
50+ $ collection = $ formatReader ($ data );
5651
5752 $ this ->assertInstanceOf (MessageCollection::class, $ collection );
5853 $ this ->assertCount (2 , $ collection );
0 commit comments