OGPResolverTestをrevert、Guzzleの例外を期待するように変更
This commit is contained in:
parent
ccade6ff9f
commit
2c4eaccf43
@ -3,12 +3,21 @@
|
||||
namespace Tests\Unit\MetadataResolver;
|
||||
|
||||
use App\MetadataResolver\OGPResolver;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
use Tests\TestCase;
|
||||
|
||||
class OGPResolverTest extends TestCase
|
||||
{
|
||||
use CreateMockedResolver;
|
||||
|
||||
public function testMissingUrl()
|
||||
{
|
||||
$this->createResolver(OGPResolver::class, '', [], 404);
|
||||
|
||||
$this->expectException(BadResponseException::class);
|
||||
$this->resolver->resolve('http://example.com/404');
|
||||
}
|
||||
|
||||
public function testResolve()
|
||||
{
|
||||
$response = <<< 'HTML'
|
||||
|
Loading…
Reference in New Issue
Block a user