From c134ce44c1b9b10c52ebaeae9f74729362506141 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 13 Feb 2019 09:13:10 +0700 Subject: [PATCH] Switch assertions to test the end of the strings --- tests/BlogPostTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/BlogPostTest.php b/tests/BlogPostTest.php index 4216af2..4439194 100644 --- a/tests/BlogPostTest.php +++ b/tests/BlogPostTest.php @@ -160,7 +160,7 @@ class BlogPostTest extends SapphireTest $archiveLink = $blogPost->getMonthlyArchiveLink($type); $this->assertContains('archive/', $archiveLink); - $this->assertContains($expected, $archiveLink); + $this->assertStringEndsWith($expected, $archiveLink); } /** @@ -182,6 +182,6 @@ class BlogPostTest extends SapphireTest $archiveLink = $blogPost->getYearlyArchiveLink(); $this->assertContains('archive/', $archiveLink); - $this->assertContains('/2013', $archiveLink); + $this->assertStringEndsWith('/2013', $archiveLink); } }