Fixed failing test
This commit is contained in:
1 parent
36f60cbb3c
commit
2c768ff5d4
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ class Cision
|
|||||||
/**
|
/**
|
||||||
* Constructor that accepts a slug identifier for the feed.
|
* Constructor that accepts a slug identifier for the feed.
|
||||||
*/
|
*/
|
||||||
public function __construct(?string $slug = null)
|
public function __construct(string $slug)
|
||||||
{
|
{
|
||||||
$this->slug = $slug;
|
$this->slug = $slug;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ it('can fetch and parse full article content', function () {
|
|||||||
'news.cision.com/*' => Http::response(file_get_contents(__DIR__.'/Fixtures/article.html')),
|
'news.cision.com/*' => Http::response(file_get_contents(__DIR__.'/Fixtures/article.html')),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$cision = new Cision;
|
$cision = new Cision('test-company');
|
||||||
$content = $cision->fetchContent('https://news.cision.com/se/example/r/test,c123456');
|
$content = $cision->fetchContent('https://news.cision.com/se/example/r/test,c123456');
|
||||||
|
|
||||||
expect($content)->toHaveKeys(['header', 'published_at', 'content']);
|
expect($content)->toHaveKeys(['header', 'published_at', 'content']);
|
||||||
|
|||||||
Reference in new issue
Block a user