server/src/tests/Controllers/ViafControllerTest.php
changeset 407 2dba812c7ef2
parent 306 3fccf43160a7
child 537 d2e6ee099125
equal deleted inserted replaced
406:cf0f23803a53 407:2dba812c7ef2
    73     public function testShowMalformed() {
    73     public function testShowMalformed() {
    74         $this->viafResolver
    74         $this->viafResolver
    75             ->shouldReceive('getNames')
    75             ->shouldReceive('getNames')
    76             ->with(['abcdef','ghij'])
    76             ->with(['abcdef','ghij'])
    77             ->once()
    77             ->once()
    78             ->andThrow('CorpusParole\Services\ViafResolverException', "ViafId not in correct format", 400);
    78             ->andThrow('CorpusParole\Services\ViafResolverException', "ViafId not in correct format", 500);
    79         $response = $this->get('/api/v1/resolvers/viaf/abcdef,ghij');
    79         $response = $this->get('/api/v1/resolvers/viaf/abcdef,ghij');
    80 
    80 
    81         $this->assertResponseStatus(400);
    81         $this->assertResponseStatus(500);
    82     }
    82     }
    83 
    83 
    84 }
    84 }