From 5415e86927d8ad397d7bbd32fdbe2bc5cf1b7849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 28 May 2021 17:12:08 +0200 Subject: [PATCH] Fix raw tag overriding --- src/SEOManager.php | 2 +- tests/Pest/ManagerTest.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SEOManager.php b/src/SEOManager.php index 82f42b9..0741226 100644 --- a/src/SEOManager.php +++ b/src/SEOManager.php @@ -195,7 +195,7 @@ class SEOManager { $tag ??= $key; - $this->tags[$tag] = $tag; + $this->tags[$key] = $tag; return $this; } diff --git a/tests/Pest/ManagerTest.php b/tests/Pest/ManagerTest.php index 50840b2..f404c9b 100644 --- a/tests/Pest/ManagerTest.php +++ b/tests/Pest/ManagerTest.php @@ -99,7 +99,9 @@ test('raw tags can be overridden', function () { seo()->rawTag('foo', ''); seo()->rawTag('foo', ''); - expect(meta())->toContain(''); + expect(meta()) + ->not()->toContain('') + ->toContain(''); }); test('canonical url is not included by default', function () {