-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from vicla31/fix_redundant_url_on_multichanne…
…ls_sitemapindex Fix redundant url on multichannels sitemapindex
- Loading branch information
Showing
5 changed files
with
44 additions
and
14 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
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
22 changes: 22 additions & 0 deletions
22
tests/Controller/MultiChannelSitemapIndexControllerApiTest.php
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\SitemapPlugin\Controller; | ||
|
||
final class MultiChannelSitemapIndexControllerApiTest extends XmlApiTestCase | ||
{ | ||
public function testShowActionResponse() | ||
{ | ||
$this->loadFixturesFromFiles(['multi_channel.yaml']); | ||
$this->generateSitemaps(); | ||
|
||
$response = $this->getBufferedResponse('http://localhost/sitemap_index.xml'); | ||
$this->assertResponse($response, 'show_sitemap_index'); | ||
|
||
$response = $this->getBufferedResponse('http://store.fr/sitemap_index.xml'); | ||
$this->assertResponse($response, 'show_second_sitemap_index'); | ||
|
||
$this->deleteSitemaps(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<sitemap> | ||
<loc>http://store.fr/sitemap/products.xml</loc> | ||
</sitemap> | ||
<sitemap> | ||
<loc>http://store.fr/sitemap/taxons.xml</loc> | ||
</sitemap> | ||
<sitemap> | ||
<loc>http://store.fr/sitemap/static.xml</loc> | ||
</sitemap> | ||
</sitemapindex> |