diff --git a/test/Controller/AboutAimsScopeControllerTest.php b/test/Controller/AboutAimsScopeControllerTest.php index 4498fe174..e38cbfccc 100644 --- a/test/Controller/AboutAimsScopeControllerTest.php +++ b/test/Controller/AboutAimsScopeControllerTest.php @@ -149,10 +149,10 @@ public function it_has_metadata() $this->assertSame('eLife welcomes the submission of Research Articles, Short Reports, Tools and Resources articles, Research Advances, Scientific Correspondence and Review Articles in the subject areas below.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife welcomes the submission of Research Articles, Short Reports, Tools and Resources articles, Research Advances, Scientific Correspondence and Review Articles in the subject areas below.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutControllerTest.php b/test/Controller/AboutControllerTest.php index 3599145e2..478997463 100644 --- a/test/Controller/AboutControllerTest.php +++ b/test/Controller/AboutControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertSame('Independent, not-for-profit and supported by funders, eLife improves the way research is practised and shared.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('Independent, not-for-profit and supported by funders, eLife improves the way research is practised and shared.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutPeerReviewControllerTest.php b/test/Controller/AboutPeerReviewControllerTest.php index e038acf37..860218c89 100644 --- a/test/Controller/AboutPeerReviewControllerTest.php +++ b/test/Controller/AboutPeerReviewControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertSame('eLife\'s review process combines the immediacy and openness of preprints with the scrutiny of peer review by experts.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife\'s review process combines the immediacy and openness of preprints with the scrutiny of peer review by experts.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutPeopleControllerTest.php b/test/Controller/AboutPeopleControllerTest.php index bab2990d2..47bc9945a 100644 --- a/test/Controller/AboutPeopleControllerTest.php +++ b/test/Controller/AboutPeopleControllerTest.php @@ -172,10 +172,10 @@ public function it_has_metadata() $this->assertSame('eLife’s editors, early-career advisors, governing board, and executive staff work in concert to realise our mission.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife’s editors, early-career advisors, governing board, and executive staff work in concert to realise our mission.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutPublishingWithElifeControllerTest.php b/test/Controller/AboutPublishingWithElifeControllerTest.php index 1303db896..9bc090144 100644 --- a/test/Controller/AboutPublishingWithElifeControllerTest.php +++ b/test/Controller/AboutPublishingWithElifeControllerTest.php @@ -154,10 +154,10 @@ public function it_has_metadata() $this->assertSame('eLife welcomes the submission of Research Articles, Short Reports, Tools and Resources articles, Research Advances, Scientific Correspondence and Review Articles in the subject areas below.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife welcomes the submission of Research Articles, Short Reports, Tools and Resources articles, Research Advances, Scientific Correspondence and Review Articles in the subject areas below.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutResearchCultureControllerTest.php b/test/Controller/AboutResearchCultureControllerTest.php index e13e8c27d..65159a86e 100644 --- a/test/Controller/AboutResearchCultureControllerTest.php +++ b/test/Controller/AboutResearchCultureControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertSame('eLife recognises that reforming research communication depends on improving research culture.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife recognises that reforming research communication depends on improving research culture.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AboutTechnologyControllerTest.php b/test/Controller/AboutTechnologyControllerTest.php index 4591d8082..be73a907a 100644 --- a/test/Controller/AboutTechnologyControllerTest.php +++ b/test/Controller/AboutTechnologyControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertSame('eLife develops and invests in technology that enhances the sharing and use of research results online.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife develops and invests in technology that enhances the sharing and use of research results online.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AlertsControllerTest.php b/test/Controller/AlertsControllerTest.php index 8ac58c5e3..52b5f67e9 100644 --- a/test/Controller/AlertsControllerTest.php +++ b/test/Controller/AlertsControllerTest.php @@ -99,10 +99,10 @@ public function it_has_metadata() $this->assertSame('Stay in touch with eLife efforts to support the community and open science as well as new research. Choose your feeds and preferred ways to connect below.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('Stay in touch with eLife efforts to support the community and open science as well as new research. Choose your feeds and preferred ways to connect below.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/AnnualReportsControllerTest.php b/test/Controller/AnnualReportsControllerTest.php index 289f9afcf..76897f182 100644 --- a/test/Controller/AnnualReportsControllerTest.php +++ b/test/Controller/AnnualReportsControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ArchiveControllerTest.php b/test/Controller/ArchiveControllerTest.php index 6501567d5..07b7a4c79 100644 --- a/test/Controller/ArchiveControllerTest.php +++ b/test/Controller/ArchiveControllerTest.php @@ -69,10 +69,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ArchiveMonthControllerTest.php b/test/Controller/ArchiveMonthControllerTest.php index a6a3c8078..c55d7e87b 100644 --- a/test/Controller/ArchiveMonthControllerTest.php +++ b/test/Controller/ArchiveMonthControllerTest.php @@ -48,10 +48,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ArticleControllerTest.php b/test/Controller/ArticleControllerTest.php index 3d6935c2d..c3d93b07f 100644 --- a/test/Controller/ArticleControllerTest.php +++ b/test/Controller/ArticleControllerTest.php @@ -148,10 +148,10 @@ public function it_has_metadata() $this->assertSame('Article title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('doi:10.7554/eLife.00001', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertSame('Article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); @@ -309,8 +309,8 @@ public function it_may_have_a_social_image() $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); $this->assertSame('https://www.example.com/iiif/image/social/full/full/0/default.jpg', $crawler->filter('meta[name="twitter:image"]')->attr('content')); $this->assertSame('https://www.example.com/iiif/image/social/full/full/0/default.jpg', $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); } /** @@ -1872,10 +1872,10 @@ public function it_has_metadata_on_previous_versions() $this->assertSame('Article title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('doi:10.7554/eLife.00001', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertSame('Article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/ArticleEraControllerTest.php b/test/Controller/ArticleEraControllerTest.php index df7ccf45a..45571cabe 100644 --- a/test/Controller/ArticleEraControllerTest.php +++ b/test/Controller/ArticleEraControllerTest.php @@ -55,10 +55,10 @@ public function it_has_metadata() $this->assertSame('Article title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[property="og:type"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('doi:10.7554/eLife.id-of-article-with-era', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertSame('Article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/ArticleFiguresControllerTest.php b/test/Controller/ArticleFiguresControllerTest.php index 9886db27f..f4f27ab8d 100644 --- a/test/Controller/ArticleFiguresControllerTest.php +++ b/test/Controller/ArticleFiguresControllerTest.php @@ -80,10 +80,10 @@ public function it_has_metadata() $this->assertSame('Figures and data in Article title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('doi:10.7554/eLife.00001', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertSame('Article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); @@ -137,10 +137,10 @@ public function it_has_metadata_for_previous_versions() $this->assertSame('Figures and data in Article title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('doi:10.7554/eLife.00001', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertSame('Article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/ArticleTypeControllerTest.php b/test/Controller/ArticleTypeControllerTest.php index a9998f3b4..73298fa4e 100644 --- a/test/Controller/ArticleTypeControllerTest.php +++ b/test/Controller/ArticleTypeControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertSame('Research Articles published by eLife are full-length studies that present important breakthroughs across the life sciences and biomedicine. There is no maximum length and no limits on the number of display items.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('Research Articles published by eLife are full-length studies that present important breakthroughs across the life sciences and biomedicine. There is no maximum length and no limits on the number of display items.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/CollectionsControllerTest.php b/test/Controller/CollectionsControllerTest.php index 8f52e1ed5..3d653e823 100644 --- a/test/Controller/CollectionsControllerTest.php +++ b/test/Controller/CollectionsControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ContactControllerTest.php b/test/Controller/ContactControllerTest.php index bd148e5bf..7f9cf11c2 100644 --- a/test/Controller/ContactControllerTest.php +++ b/test/Controller/ContactControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ContentAlertsControllerTest.php b/test/Controller/ContentAlertsControllerTest.php index e6b51add0..c4bc9fa31 100644 --- a/test/Controller/ContentAlertsControllerTest.php +++ b/test/Controller/ContentAlertsControllerTest.php @@ -55,10 +55,10 @@ public function it_has_metadata(string $url) $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ContentAlertsOptoutControllerTest.php b/test/Controller/ContentAlertsOptoutControllerTest.php index 824c65a51..aea9ff64e 100644 --- a/test/Controller/ContentAlertsOptoutControllerTest.php +++ b/test/Controller/ContentAlertsOptoutControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ContentAlertsUnsubscribeControllerTest.php b/test/Controller/ContentAlertsUnsubscribeControllerTest.php index 2c8d95c10..f3cfea409 100644 --- a/test/Controller/ContentAlertsUnsubscribeControllerTest.php +++ b/test/Controller/ContentAlertsUnsubscribeControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ContentAlertsUpdateControllerTest.php b/test/Controller/ContentAlertsUpdateControllerTest.php index 2607b0b4c..9da35647e 100644 --- a/test/Controller/ContentAlertsUpdateControllerTest.php +++ b/test/Controller/ContentAlertsUpdateControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/DigestControllerTest.php b/test/Controller/DigestControllerTest.php index d20443ebe..439c03bb6 100644 --- a/test/Controller/DigestControllerTest.php +++ b/test/Controller/DigestControllerTest.php @@ -132,7 +132,7 @@ public function it_has_metadata() $this->assertSame('summary_large_image', $crawler->filter('meta[name="twitter:card"]')->attr('content')); $this->assertSame('https://www.example.com/iiif/thumb%2Fnail/full/full/0/default.jpg', $crawler->filter('meta[property="og:image"]')->attr('content')); $this->assertSame('800', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('digest/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Digest title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/DigestsControllerTest.php b/test/Controller/DigestsControllerTest.php index dc78f912c..8be8ba3c0 100644 --- a/test/Controller/DigestsControllerTest.php +++ b/test/Controller/DigestsControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertSame('Cutting jargon and putting research in context, digests showcase some of the latest articles published in eLife.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('Cutting jargon and putting research in context, digests showcase some of the latest articles published in eLife.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('application/rss+xml', $crawler->filter('link[rel="alternate"]')->attr('type')); $this->assertSame('eLife Sciences Digests', $crawler->filter('link[rel="alternate"]')->attr('title')); $this->assertSame('/rss/digests.xml', $crawler->filter('link[rel="alternate"]')->attr('href')); diff --git a/test/Controller/EventControllerTest.php b/test/Controller/EventControllerTest.php index bb461d614..9fe5e671c 100644 --- a/test/Controller/EventControllerTest.php +++ b/test/Controller/EventControllerTest.php @@ -94,10 +94,10 @@ public function it_has_metadata() $this->assertSame('Event title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('event/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Event title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/EventsControllerTest.php b/test/Controller/EventsControllerTest.php index 81321b24b..3568babf1 100644 --- a/test/Controller/EventsControllerTest.php +++ b/test/Controller/EventsControllerTest.php @@ -43,10 +43,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/HomeControllerTest.php b/test/Controller/HomeControllerTest.php index 6210d6318..031b545c0 100644 --- a/test/Controller/HomeControllerTest.php +++ b/test/Controller/HomeControllerTest.php @@ -387,10 +387,10 @@ public function it_has_metadata() $this->assertSame('eLife works to improve research communication through open science and open technology innovation', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife works to improve research communication through open science and open technology innovation', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('application/rss+xml', $crawler->filter('link[rel="alternate"]')->attr('type')); $this->assertSame('Read the latest life sciences research from eLife Sciences', $crawler->filter('link[rel="alternate"]')->attr('title')); $this->assertSame('/rss/recent.xml', $crawler->filter('link[rel="alternate"]')->attr('href')); diff --git a/test/Controller/InsideElifeArticleControllerTest.php b/test/Controller/InsideElifeArticleControllerTest.php index b1bf0d1b6..22ff16758 100644 --- a/test/Controller/InsideElifeArticleControllerTest.php +++ b/test/Controller/InsideElifeArticleControllerTest.php @@ -110,10 +110,10 @@ public function it_has_metadata() $this->assertSame('Blog article impact statement', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('blog-article/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Blog article title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/InsideElifeControllerTest.php b/test/Controller/InsideElifeControllerTest.php index 5349a6b75..3e7e51fe0 100644 --- a/test/Controller/InsideElifeControllerTest.php +++ b/test/Controller/InsideElifeControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/InterviewControllerTest.php b/test/Controller/InterviewControllerTest.php index 6c064dfe1..ac986ee0e 100644 --- a/test/Controller/InterviewControllerTest.php +++ b/test/Controller/InterviewControllerTest.php @@ -159,10 +159,10 @@ public function it_has_metadata() $this->assertSame('Interview impact statement', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('interview/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Interview title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/InterviewsControllerTest.php b/test/Controller/InterviewsControllerTest.php index 2494b37a1..e1f1a9251 100644 --- a/test/Controller/InterviewsControllerTest.php +++ b/test/Controller/InterviewsControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/JobAdvertControllerTest.php b/test/Controller/JobAdvertControllerTest.php index 30e154907..4aa5ca77c 100644 --- a/test/Controller/JobAdvertControllerTest.php +++ b/test/Controller/JobAdvertControllerTest.php @@ -47,10 +47,10 @@ public function it_has_metadata() $this->assertSame('Job advert title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('job-advert/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Job advert title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/JobAdvertsControllerTest.php b/test/Controller/JobAdvertsControllerTest.php index 95c9769a4..e71d1efa8 100644 --- a/test/Controller/JobAdvertsControllerTest.php +++ b/test/Controller/JobAdvertsControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/LabsPostControllerTest.php b/test/Controller/LabsPostControllerTest.php index 8778e52b8..f036963d9 100644 --- a/test/Controller/LabsPostControllerTest.php +++ b/test/Controller/LabsPostControllerTest.php @@ -99,7 +99,7 @@ public function it_has_metadata() $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary_large_image', $crawler->filter('meta[name="twitter:card"]')->attr('content')); $this->assertSame('https://www.example.com/iiif/thumb%2Fnail/full/full/0/default.jpg', $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); $this->assertSame('800', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('labs-post/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); diff --git a/test/Controller/MediaPolicyControllerTest.php b/test/Controller/MediaPolicyControllerTest.php index 8cf389322..3af4a4a4d 100644 --- a/test/Controller/MediaPolicyControllerTest.php +++ b/test/Controller/MediaPolicyControllerTest.php @@ -45,10 +45,10 @@ public function it_has_metadata() $this->assertSame('Media policy', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('eLife\'s media policy is designed to encourage high-quality, informed and widespread discussion of new research — before and after publication.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/PeerReviewProcessControllerTest.php b/test/Controller/PeerReviewProcessControllerTest.php index 26e01510c..d80eb6a05 100644 --- a/test/Controller/PeerReviewProcessControllerTest.php +++ b/test/Controller/PeerReviewProcessControllerTest.php @@ -46,10 +46,10 @@ public function it_has_metadata() $this->assertSame('eLife is changing its editorial process to emphasize public reviews and assessments of preprints by eliminating accept/reject decisions after peer review.To learn more about why eLife’s process is changing, read the Editorial.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('eLife is changing its editorial process to emphasize public reviews and assessments of preprints by eliminating accept/reject decisions after peer review.To learn more about why eLife’s process is changing, read the Editorial.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/PodcastControllerTest.php b/test/Controller/PodcastControllerTest.php index e8c38fba1..a40eb6b0d 100644 --- a/test/Controller/PodcastControllerTest.php +++ b/test/Controller/PodcastControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/PressPackControllerTest.php b/test/Controller/PressPackControllerTest.php index 5ff15e581..1dad67e47 100644 --- a/test/Controller/PressPackControllerTest.php +++ b/test/Controller/PressPackControllerTest.php @@ -231,10 +231,10 @@ public function it_has_metadata() $this->assertSame('Press package title', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('article', $crawler->filter('meta[property="og:type"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertSame('press-package/1', $crawler->filter('meta[name="dc.identifier"]')->attr('content')); $this->assertSame('elifesciences.org', $crawler->filter('meta[name="dc.relation.ispartof"]')->attr('content')); $this->assertSame('Press package title', $crawler->filter('meta[name="dc.title"]')->attr('content')); diff --git a/test/Controller/PressPacksControllerTest.php b/test/Controller/PressPacksControllerTest.php index 927bd35f6..7f1532685 100644 --- a/test/Controller/PressPacksControllerTest.php +++ b/test/Controller/PressPacksControllerTest.php @@ -40,10 +40,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/PrivacyControllerTest.php b/test/Controller/PrivacyControllerTest.php index 255d9cf2a..cf68e10c2 100644 --- a/test/Controller/PrivacyControllerTest.php +++ b/test/Controller/PrivacyControllerTest.php @@ -46,10 +46,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ProfileControllerTest.php b/test/Controller/ProfileControllerTest.php index 5f9ec4983..ad68a44d1 100644 --- a/test/Controller/ProfileControllerTest.php +++ b/test/Controller/ProfileControllerTest.php @@ -206,10 +206,10 @@ public function it_has_metadata() $this->assertSame('http://localhost/profiles/1', $crawler->filter('meta[property="og:url"]')->attr('content')); $this->assertSame('Preferred Name', $crawler->filter('meta[property="og:title"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ResourcesControllerTest.php b/test/Controller/ResourcesControllerTest.php index 851a17824..615031a0d 100644 --- a/test/Controller/ResourcesControllerTest.php +++ b/test/Controller/ResourcesControllerTest.php @@ -49,10 +49,10 @@ public function it_has_metadata() $this->assertSame('A collection of resources, from posters, videos, images, presentations and more, to the brand behind eLife.', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('A collection of resources, from posters, videos, images, presentations and more, to the brand behind eLife.', $crawler->filter('meta[name="description"]')->attr('content')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/ReviewedPreprintsControllerTest.php b/test/Controller/ReviewedPreprintsControllerTest.php index 40302a427..1766b0b5c 100644 --- a/test/Controller/ReviewedPreprintsControllerTest.php +++ b/test/Controller/ReviewedPreprintsControllerTest.php @@ -170,10 +170,10 @@ public function it_has_metadata() $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); $this->assertSame('Preprints that have been invited for review by eLife are published as Reviewed Preprints and include an eLife assessment, public reviews and a response from the authors (if available).', $crawler->filter('meta[property="og:description"]')->attr('content')); $this->assertSame('Preprints that have been invited for review by eLife are published as Reviewed Preprints and include an eLife assessment, public reviews and a response from the authors (if available).', $crawler->filter('meta[name="description"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/SearchControllerTest.php b/test/Controller/SearchControllerTest.php index 1259fd8a1..b781b612b 100644 --- a/test/Controller/SearchControllerTest.php +++ b/test/Controller/SearchControllerTest.php @@ -349,10 +349,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/SubjectsControllerTest.php b/test/Controller/SubjectsControllerTest.php index 04fdbf404..5026e9658 100644 --- a/test/Controller/SubjectsControllerTest.php +++ b/test/Controller/SubjectsControllerTest.php @@ -39,10 +39,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/TermsControllerTest.php b/test/Controller/TermsControllerTest.php index 75573d906..89e7ccd71 100644 --- a/test/Controller/TermsControllerTest.php +++ b/test/Controller/TermsControllerTest.php @@ -35,10 +35,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]')); diff --git a/test/Controller/WhoWeWorkWithControllerTest.php b/test/Controller/WhoWeWorkWithControllerTest.php index e4544ff4a..749adeda6 100644 --- a/test/Controller/WhoWeWorkWithControllerTest.php +++ b/test/Controller/WhoWeWorkWithControllerTest.php @@ -224,10 +224,10 @@ public function it_has_metadata() $this->assertEmpty($crawler->filter('meta[property="og:description"]')); $this->assertEmpty($crawler->filter('meta[name="description"]')); $this->assertSame('summary', $crawler->filter('meta[name="twitter:card"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); - $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-600x600@1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:width"]')->attr('content')); - $this->assertSame('600', $crawler->filter('meta[property="og:image:height"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content')); + $this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/icon-280x200@1.c5b562b1.png'), '/'), $crawler->filter('meta[property="og:image"]')->attr('content')); + $this->assertSame('280', $crawler->filter('meta[property="og:image:width"]')->attr('content')); + $this->assertSame('200', $crawler->filter('meta[property="og:image:height"]')->attr('content')); $this->assertEmpty($crawler->filter('meta[name="dc.identifier"]')); $this->assertEmpty($crawler->filter('meta[name="dc.relation.ispartof"]')); $this->assertEmpty($crawler->filter('meta[name="dc.title"]'));