Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
finish stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectricMaxxx committed Dec 13, 2014
1 parent f73646b commit 3d56fbf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Resources/views/Sitemap/index.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<loc>{{ url.loc }}</loc>
<lastmod>{{ url.lastmod }}</lastmod>
<changefreq>{{ url.changeFreq }}</changefreq>
{% if alternateLoace is defined %}
{% for locale in alternateLocales %}
{% if url.alternateLocales is defined and url.alternateLocales|length > 0 %}
{% for locale in url.alternateLocales %}
<xhtml:link rel="alternate" hreflang="{{ locale.hrefLocale }}" href="{{ locale.href }}"/>
{% endfor %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Functional\Sitemap;
namespace Symfony\Cmf\Bundle\SeoBundle\Tests\Functional\Doctrine\Phpcr;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ODM\PHPCR\DocumentManager;
Expand Down
6 changes: 3 additions & 3 deletions Tests/Unit/Controller/SitemapControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ public function testRequestXml()

public function testRequestHtml()
{
$response = new Response('some-html-string');
$this->templating->expects($this->once())->method('render')->will($this->returnValue($response));
$expectedResponse = new Response('some-html-string');
$this->templating->expects($this->once())->method('render')->will($this->returnValue($expectedResponse));

/** @var Response $response */
$response = $this->controller->indexAction('html');

$this->assertEquals(new Response('some-html-string'), $response->getContent());
$this->assertEquals($expectedResponse, $response->getContent());
}

private function createRoutes()
Expand Down
1 change: 1 addition & 0 deletions Tests/WebTest/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function getContent($format)
<loc>http://localhost/sitemap-aware</loc>
<lastmod/>
<changefreq>always</changefreq>
<xhtml:link href="http://localhost/sitemap-aware?_locale=de" hreflang="de" rel="alternate"/>
</url>
<url>
<loc>http://localhost/sitemap-aware-publish</loc>
Expand Down

0 comments on commit 3d56fbf

Please sign in to comment.