diff -r b64c8c35c67d -r d2e6ee099125 server/src/tests/Services/ViafResolverTest.php --- a/server/src/tests/Services/ViafResolverTest.php Sat Jun 10 22:43:58 2017 +0200 +++ b/server/src/tests/Services/ViafResolverTest.php Mon Jun 12 14:53:59 2017 +0200 @@ -69,7 +69,7 @@ * test getName */ public function testGetName() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client); $name = $resolver->getName('56666014'); $this->assertEquals('Guylaine Brun-Trigaud', $name, "Name must be Guylaine Brun-Trigaud"); @@ -84,7 +84,7 @@ * test getName */ public function testGetName93752300() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client); $name = $resolver->getName('56666014'); //first to consume responses $name = $resolver->getName('93752300'); @@ -101,7 +101,7 @@ * test unknown id */ public function testUnkownName404() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client404]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client404); $name = $resolver->getName('12345'); @@ -112,7 +112,7 @@ * test unknown id */ public function testUnkownName() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client); $name = $resolver->getName('12345'); @@ -126,7 +126,7 @@ * @expectedExceptionCode 401 */ public function test401Error() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client401]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client401); $name = $resolver->getName('12345'); } @@ -139,7 +139,7 @@ * @expectedExceptionCode 500 */ public function test500Error() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client500]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client500); $name = $resolver->getName('12345'); } @@ -151,7 +151,7 @@ * @expectedExceptionCode 400 */ public function testMalformedError() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client); $name = $resolver->getName('abcd'); } @@ -160,7 +160,7 @@ * test getnames */ public function testGetNames() { - $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]); + $resolver = new \CorpusParole\Services\ViafResolver($this->client); $names = $resolver->getNames(['56666014', '93752300']); $this->assertCount(2, $names);