Merge pull request #2705 from creative-commoners/pulls/4/assert-string

MNT Assert string
This commit is contained in:
Steve Boyd 2021-11-22 11:55:06 +13:00 committed by GitHub
commit ccaec7bc07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,11 +103,11 @@ class VirtualPageTest extends FunctionalTest
// Test with title
$meta = $vp1->MetaTags();
$charset = Config::inst()->get(ContentNegotiator::class, 'encoding');
$this->assertContains('<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'"', $meta);
$this->assertContains('<link rel="canonical" href="'.$master->AbsoluteLink().'"', $meta);
$this->assertContains('<meta name="x-page-id" content="'.$vp1->ID.'"', $meta);
$this->assertContains('<meta name="x-cms-edit-link" content="'.$vp1->CMSEditLink().'"', $meta);
$this->assertContains('<title>'.$master->Title.'</title>', $meta);
$this->assertStringContainsString('<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'"', $meta);
$this->assertStringContainsString('<link rel="canonical" href="'.$master->AbsoluteLink().'"', $meta);
$this->assertStringContainsString('<meta name="x-page-id" content="'.$vp1->ID.'"', $meta);
$this->assertStringContainsString('<meta name="x-cms-edit-link" content="'.$vp1->CMSEditLink().'"', $meta);
$this->assertStringContainsString('<title>'.$master->Title.'</title>', $meta);
}
/**