Skip to content

Commit

Permalink
add UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
mamuz committed Sep 2, 2014
1 parent 9bd925f commit 64a63fc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
21 changes: 11 additions & 10 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@
'MamuzBlogFeed' => array(
'default' => array(
'maxResults' => 100,
'id' => 'http://local.marco-muths.de/blog-feed',
'type' => 'rss',
'id' => '',
'copyright' => '',
'language' => '',
'dateCreated' => '',
'dateModified' => '',
'lastBuildDate' => '',
'title' => '',
'encoding' => '',
'copyright' => 'mamuz',
'language' => 'de-DE',
'dateCreated' => new \DateTime,
'dateModified' => new \DateTime,
'lastBuildDate' => new \DateTime,
'title' => 'mamuz feed',
'description' => 'description',
'link' => 'http://local.marco-muths.de/blog-feed',
/*'encoding' => '',
'baseUrl' => '',
'description' => '',
'link' => '',
'hubs' => array(),
'feedLinks' => array(
Expand Down Expand Up @@ -72,7 +73,7 @@
'email' => '',
'uri' => '',
),
),
),*/
),
),
);
2 changes: 1 addition & 1 deletion src/MamuzBlogFeed/Filter/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace MamuzBlogFeed\Filter;

use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\Query as QueryBuilder;
use Zend\Filter\FilterInterface;

class Query implements FilterInterface
Expand Down
2 changes: 1 addition & 1 deletion src/MamuzBlogFeed/View/Helper/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private function createEntryBy(Post $post)
$entry->setId($this->getRenderer()->hashId($post->getId()));
$entry->setTitle($post->getTitle());
$entry->setLink($this->getRenderer()->permaLinkPost($post));
$entry->setDescription($this->getRenderer()->markdown($post->getDescription()));
$entry->setDescription($this->getRenderer()->markdown($post->getDescription()) . 'test');
$entry->setContent($this->getRenderer()->markdown($post->getContent()));
$entry->setDateModified($post->getModifiedAt());
$entry->setDateCreated($post->getCreatedAt());
Expand Down
4 changes: 2 additions & 2 deletions tests/MamuzBlogFeedTest/Filter/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class QueryTest extends \PHPUnit_Framework_TestCase
/** @var Query */
protected $fixture;

/** @var \Doctrine\ORM\QueryBuilder | \Mockery\MockInterface */
/** @var \Doctrine\ORM\Query | \Mockery\MockInterface */
protected $query;

protected function setUp()
{
$this->query = \Mockery::mock('Doctrine\ORM\QueryBuilder');
$this->query = \Mockery::mock('Doctrine\ORM\Query');
$this->query->shouldReceive('setFirstResult')->with(1)->andReturnSelf();
$this->fixture = new Query();
}
Expand Down

0 comments on commit 64a63fc

Please sign in to comment.