server/src/tests/Controllers/GeonamesControllerTest.php
changeset 407 2dba812c7ef2
parent 306 3fccf43160a7
child 537 d2e6ee099125
equal deleted inserted replaced
406:cf0f23803a53 407:2dba812c7ef2
    68     public function testShowMalformed() {
    68     public function testShowMalformed() {
    69         $this->geonamesResolver
    69         $this->geonamesResolver
    70             ->shouldReceive('getLabels')
    70             ->shouldReceive('getLabels')
    71             ->with(['abcdef','ghij'])
    71             ->with(['abcdef','ghij'])
    72             ->once()
    72             ->once()
    73             ->andThrow('CorpusParole\Services\GeonamesResolverException', "GeonamesId not in correct format", 400);
    73             ->andThrow('CorpusParole\Services\GeonamesResolverException', "GeonamesId not in correct format", 500);
    74         $response = $this->get('/api/v1/resolvers/geonames/abcdef,ghij');
    74         $response = $this->get('/api/v1/resolvers/geonames/abcdef,ghij');
    75 
    75 
    76         $this->assertResponseStatus(400);
    76         $this->assertResponseStatus(500);
    77     }
    77     }
    78 
    78 
    79 }
    79 }