-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Use https everywhere, fixes #43 * Test PHP 7.1 and remove HHVM testing.
- Loading branch information
1 parent
013b332
commit 33733b9
Showing
14 changed files
with
78 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,19 @@ function it_should_format_a_sitemapindex_with_n_sitemaps() | |
{ | ||
$xml = <<<XML | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<sitemapindex xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<sitemap> | ||
<loc>http://www.example.com/sitemap1.xml.gz</loc> | ||
<loc>https://www.example.com/sitemap1.xml.gz</loc> | ||
</sitemap> | ||
<sitemap> | ||
<loc>http://www.example.com/sitemap1.xml.gz</loc> | ||
<loc>https://www.example.com/sitemap1.xml.gz</loc> | ||
</sitemap> | ||
</sitemapindex> | ||
XML; | ||
|
||
$sitemapIndex = new SitemapIndex(); | ||
$sitemapIndex->addSitemap(new Sitemap('http://www.example.com/sitemap1.xml.gz')); | ||
$sitemapIndex->addSitemap(new Sitemap('http://www.example.com/sitemap1.xml.gz')); | ||
$sitemapIndex->addSitemap(new Sitemap('https://www.example.com/sitemap1.xml.gz')); | ||
$sitemapIndex->addSitemap(new Sitemap('https://www.example.com/sitemap1.xml.gz')); | ||
|
||
$this->getOutput($sitemapIndex)->shouldReturn($xml); | ||
} | ||
|
@@ -43,51 +43,51 @@ function it_should_generate_a_sitemap_of_images() | |
{ | ||
$xml = <<<XML | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"> | ||
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="https://www.google.com/schemas/sitemap-image/1.1"> | ||
<url> | ||
<loc>http://www.example.com/1</loc> | ||
<loc>https://www.example.com/1</loc> | ||
<image:image> | ||
<image:loc>https://s3.amazonaws.com/path/to/image</image:loc> | ||
<image:loc>httpss://s3.amazonaws.com/path/to/image</image:loc> | ||
</image:image> | ||
<image:image> | ||
<image:loc>https://s3.amazonaws.com/path/to/image2</image:loc> | ||
<image:loc>httpss://s3.amazonaws.com/path/to/image2</image:loc> | ||
<image:caption>Test Caption</image:caption> | ||
<image:geo_location>Limerick, Ireland</image:geo_location> | ||
<image:title>Test Title</image:title> | ||
<image:license>http://www.license.com</image:license> | ||
<image:license>https://www.license.com</image:license> | ||
</image:image> | ||
</url> | ||
<url> | ||
<loc>http://www.example.com/2</loc> | ||
<loc>https://www.example.com/2</loc> | ||
<image:image> | ||
<image:loc>https://s3.amazonaws.com/path/to/image</image:loc> | ||
<image:loc>httpss://s3.amazonaws.com/path/to/image</image:loc> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ThePixelDeveloper
Author
Owner
|
||
</image:image> | ||
<image:image> | ||
<image:loc>https://s3.amazonaws.com/path/to/image2</image:loc> | ||
<image:loc>httpss://s3.amazonaws.com/path/to/image2</image:loc> | ||
<image:caption>Test Caption</image:caption> | ||
<image:geo_location>Limerick, Ireland</image:geo_location> | ||
<image:title>Test Title</image:title> | ||
<image:license>http://www.license.com</image:license> | ||
<image:license>https://www.license.com</image:license> | ||
</image:image> | ||
</url> | ||
</urlset> | ||
XML; | ||
|
||
$urlset = new Urlset(); | ||
|
||
$image2 = new Image('https://s3.amazonaws.com/path/to/image2'); | ||
$image2 = new Image('httpss://s3.amazonaws.com/path/to/image2'); | ||
$image2->setCaption('Test Caption'); | ||
$image2->setGeoLocation('Limerick, Ireland'); | ||
$image2->setTitle('Test Title'); | ||
$image2->setLicense('http://www.license.com'); | ||
$image2->setLicense('https://www.license.com'); | ||
|
||
$image = new Image('https://s3.amazonaws.com/path/to/image'); | ||
$image = new Image('httpss://s3.amazonaws.com/path/to/image'); | ||
|
||
$imageUrl = new Url('http://www.example.com/1'); | ||
$imageUrl = new Url('https://www.example.com/1'); | ||
$imageUrl->addSubElement($image); | ||
$imageUrl->addSubElement($image2); | ||
|
||
$imageUrl2 = new Url('http://www.example.com/2'); | ||
$imageUrl2 = new Url('https://www.example.com/2'); | ||
$imageUrl2->addSubElement($image); | ||
$imageUrl2->addSubElement($image2); | ||
|
||
|
@@ -101,44 +101,44 @@ function it_should_generate_a_sitemap_with_links() | |
{ | ||
$xml = <<<XML | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | ||
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml"> | ||
<url> | ||
<loc>http://www.example.com/english/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/> | ||
<loc>https://www.example.com/english/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/> | ||
</url> | ||
<url> | ||
<loc>http://www.example.com/deutsch/</loc> | ||
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/> | ||
<loc>https://www.example.com/deutsch/</loc> | ||
<xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/> | ||
</url> | ||
<url> | ||
<loc>http://www.example.com/schweiz-deutsch/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/> | ||
<loc>https://www.example.com/schweiz-deutsch/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/> | ||
</url> | ||
</urlset> | ||
XML; | ||
$urlset = new Urlset(); | ||
$url = new Url('http://www.example.com/english/'); | ||
$url->addSubElement(new Link('de', 'http://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('de-ch', 'http://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('en', 'http://www.example.com/english/')); | ||
$url = new Url('https://www.example.com/english/'); | ||
$url->addSubElement(new Link('de', 'https://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('de-ch', 'https://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('en', 'https://www.example.com/english/')); | ||
$urlset->addUrl($url); | ||
|
||
$url = new Url('http://www.example.com/deutsch/'); | ||
$url->addSubElement(new Link('en', 'http://www.example.com/english/')); | ||
$url->addSubElement(new Link('de-ch', 'http://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('de', 'http://www.example.com/deutsch/')); | ||
$url = new Url('https://www.example.com/deutsch/'); | ||
$url->addSubElement(new Link('en', 'https://www.example.com/english/')); | ||
$url->addSubElement(new Link('de-ch', 'https://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('de', 'https://www.example.com/deutsch/')); | ||
$urlset->addUrl($url); | ||
|
||
$url = new Url('http://www.example.com/schweiz-deutsch/'); | ||
$url->addSubElement(new Link('de', 'http://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('en', 'http://www.example.com/english/')); | ||
$url->addSubElement(new Link('de-ch', 'http://www.example.com/schweiz-deutsch/')); | ||
$url = new Url('https://www.example.com/schweiz-deutsch/'); | ||
$url->addSubElement(new Link('de', 'https://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('en', 'https://www.example.com/english/')); | ||
$url->addSubElement(new Link('de-ch', 'https://www.example.com/schweiz-deutsch/')); | ||
$urlset->addUrl($url); | ||
|
||
$this->getOutput($urlset)->shouldReturn($xml); | ||
|
@@ -149,21 +149,21 @@ function it_should_write_processing_instructions() | |
$xml = <<<XML | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?> | ||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | ||
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml"> | ||
<url> | ||
<loc>http://www.example.com/english/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/> | ||
<loc>https://www.example.com/english/</loc> | ||
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/> | ||
<xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/> | ||
</url> | ||
</urlset> | ||
XML; | ||
|
||
$urlset = new Urlset(); | ||
$url = new Url('http://www.example.com/english/'); | ||
$url->addSubElement(new Link('de', 'http://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('de-ch', 'http://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('en', 'http://www.example.com/english/')); | ||
$url = new Url('https://www.example.com/english/'); | ||
$url->addSubElement(new Link('de', 'https://www.example.com/deutsch/')); | ||
$url->addSubElement(new Link('de-ch', 'https://www.example.com/schweiz-deutsch/')); | ||
$url->addSubElement(new Link('en', 'https://www.example.com/english/')); | ||
$urlset->addUrl($url); | ||
|
||
$this->addProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Watch out here, too much httpsssss