Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
“kaganuk” committed Oct 28, 2022
1 parent e3ce831 commit 5461fbd
Show file tree
Hide file tree
Showing 45 changed files with 94 additions and 94 deletions.
4 changes: 2 additions & 2 deletions test/Controller/AboutControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AboutPeerReviewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AboutPeopleControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AboutPublishingWithElifeControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AboutResearchCultureControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AboutTechnologyControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AlertsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/AnnualReportsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/ArchiveControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/ArchiveMonthControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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"]'));
Expand Down
12 changes: 6 additions & 6 deletions test/Controller/ArticleControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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'));
Expand Down Expand Up @@ -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'));
}

/**
Expand Down Expand Up @@ -1874,8 +1874,8 @@ public function it_has_metadata_on_previous_versions()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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'));
Expand Down
4 changes: 2 additions & 2 deletions test/Controller/ArticleEraControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function it_has_metadata()
$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/[email protected]'), '/'), $crawler->filter('meta[name="twitter:image"]')->attr('content'));
$this->assertSame('http://localhost/'.ltrim(self::$kernel->getContainer()->get('elife.assets.packages')->getUrl('assets/images/social/[email protected]'), '/'), $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'));
$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'));
Expand Down
Loading

0 comments on commit 5461fbd

Please sign in to comment.