-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
111 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Tests/Resources/app/cache | ||
Tests/Resources/app/logs | ||
Tests/Resources/test_db.sqlite | ||
bin/ | ||
composer.lock | ||
vendor/ | ||
|
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" ?> | ||
<auto-mapping xmlns="http://cmf.symfony.com/schema/routing_auto"> | ||
|
||
<mapping class="Symfony\Cmf\Bundle\BlogBundle\Doctrine\Phpcr\Blog" uri-schema="/blogs/{blog}"> | ||
|
||
<token-provider token="blog" name="content_method"> | ||
<option name="method">getName</option> | ||
</token-provider> | ||
|
||
</mapping> | ||
|
||
<mapping class="Symfony\Cmf\Bundle\BlogBundle\Doctrine\Phpcr\Post" uri-schema="/blogs/{blog}/{date}/{title}"> | ||
|
||
<token-provider token="blog" name="content_method"> | ||
<option name="method">getBlog</option> | ||
</token-provider> | ||
|
||
<token-provider token="date" name="content_datetime"> | ||
<option name="method">getDate</option> | ||
</token-provider> | ||
|
||
<token-provider token="title" name="content_method"> | ||
<option name="method">getTitle</option> | ||
</token-provider> | ||
|
||
</mapping> | ||
|
||
</auto-mapping> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{# CmfBlogBundle:Blog:detail.html.twig #} | ||
|
||
{% extends "CmfBlogBundle::layout.html.twig" %} | ||
|
||
{% block content %} | ||
|
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{# CmfBlogBundle:Blog:list.html.twig #} | ||
|
||
{% extends "CmfBlogBundle::layout.html.twig" %} | ||
|
||
{% block content %} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony CMF package. | ||
* | ||
* (c) 2011-2014 Symfony CMF | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
|
||
namespace Symfony\Cmf\Bundle\BlogBundle\Tests\Functional; | ||
|
||
class PostControllerTest extends BaseTestCase | ||
{ | ||
public function testDetailAction() | ||
{ | ||
$crawler = $this->request('GET', '/blogs/blog-one/2014-01-01/first-post'); | ||
|
||
$this->assertCount(2, $crawler->filter('h1')); | ||
$this->assertCount(1, $crawler->filter("html:contains('First Post')"), | ||
'Expected to find the Post\'s title, but it was not.' | ||
); | ||
} | ||
} |
Oops, something went wrong.