Fix metaseo tests after updating to Laravel 5.6
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
||||||
|
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:title" content="@yield('title', $site_title)">
|
<meta property="og:title" content="@yield('title', $siteTitle)">
|
||||||
<meta property="og:image" content="/img/favicon.png">
|
<meta property="og:image" content="/img/favicon.png">
|
||||||
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class MetaSeoTest extends AbstractTestCase
|
|||||||
$expectedDescription = htmlspecialchars($this->fakerFactory->sentence);
|
$expectedDescription = htmlspecialchars($this->fakerFactory->sentence);
|
||||||
|
|
||||||
$incident = $this->createIncidentWithMeta(['seo' => ['description' => $expectedDescription]]);
|
$incident = $this->createIncidentWithMeta(['seo' => ['description' => $expectedDescription]]);
|
||||||
$page = $this->get(sprintf('/incidents/%d', $incident->id))->response;
|
$page = $this->get(sprintf('/incidents/%d', $incident->id));
|
||||||
|
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
sprintf('<meta property="og:description" content="%s">', $expectedDescription),
|
sprintf('<meta property="og:description" content="%s">', $expectedDescription),
|
||||||
@@ -92,7 +92,7 @@ class MetaSeoTest extends AbstractTestCase
|
|||||||
$title = htmlspecialchars($this->fakerFactory->title);
|
$title = htmlspecialchars($this->fakerFactory->title);
|
||||||
|
|
||||||
$incident = $this->createIncidentWithMeta(['seo' => ['title' => $title]]);
|
$incident = $this->createIncidentWithMeta(['seo' => ['title' => $title]]);
|
||||||
$page = $this->get(sprintf('/incidents/%d', $incident->id))->response;
|
$page = $this->get(sprintf('/incidents/%d', $incident->id));
|
||||||
|
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
sprintf('<meta property="og:title" content="%s | %s">', $title, $this->appName),
|
sprintf('<meta property="og:title" content="%s | %s">', $title, $this->appName),
|
||||||
@@ -120,7 +120,7 @@ class MetaSeoTest extends AbstractTestCase
|
|||||||
$presenter->occurred_at_formatted
|
$presenter->occurred_at_formatted
|
||||||
);
|
);
|
||||||
|
|
||||||
$page = $this->get(sprintf('/incidents/%d', $incident->id))->response;
|
$page = $this->get(sprintf('/incidents/%d', $incident->id));
|
||||||
|
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
sprintf('<meta property="og:description" content="%s">', $expectedDescription),
|
sprintf('<meta property="og:description" content="%s">', $expectedDescription),
|
||||||
@@ -141,7 +141,7 @@ class MetaSeoTest extends AbstractTestCase
|
|||||||
$incident = $this->createIncidentWithMeta([]);
|
$incident = $this->createIncidentWithMeta([]);
|
||||||
$expectedTitle = sprintf('%s | %s', htmlspecialchars($incident->name), $this->appName);
|
$expectedTitle = sprintf('%s | %s', htmlspecialchars($incident->name), $this->appName);
|
||||||
|
|
||||||
$page = $this->get(sprintf('/incidents/%d', $incident->id))->response;
|
$page = $this->get(sprintf('/incidents/%d', $incident->id));
|
||||||
|
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
sprintf('<meta property="og:title" content="%s">', $expectedTitle),
|
sprintf('<meta property="og:title" content="%s">', $expectedTitle),
|
||||||
|
|||||||
Reference in New Issue
Block a user