Skip to content

Commit

Permalink
#211 - fixed a bug in the FeedControllerTest class
Browse files Browse the repository at this point in the history
  • Loading branch information
alphadevx committed Sep 7, 2015
1 parent e926ce8 commit 34ec786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Alpha/Controller/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function doGET($request)

try {
if (isset($params['ActiveRecordType'])) {
$ActiveRecordType = $params['ActiveRecordType'];
$ActiveRecordType = urldecode($params['ActiveRecordType']);
} else {
throw new IllegalArguementException('ActiveRecordType not specified to generate feed!');
}
Expand Down
6 changes: 3 additions & 3 deletions test/Alpha/Test/Controller/FeedControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,21 @@ public function testDoGET()
$article = $this->createArticleObject('test article');
$article->save();

$request = new Request(array('method' => 'GET', 'URI' => '/feed/Article'));
$request = new Request(array('method' => 'GET', 'URI' => '/feed/'.urlencode('Alpha\Model\Article')));

$response = $front->process($request);

$this->assertEquals(200, $response->getStatus(), 'Testing the doGET method');
$this->assertEquals('application/atom+xml', $response->getHeader('Content-Type'), 'Testing the doGET method');

$request = new Request(array('method' => 'GET', 'URI' => '/feed/Article/RSS'));
$request = new Request(array('method' => 'GET', 'URI' => '/feed/'.urlencode('Alpha\Model\Article').'/RSS'));

$response = $front->process($request);

$this->assertEquals(200, $response->getStatus(), 'Testing the doGET method');
$this->assertEquals('application/rss+xml', $response->getHeader('Content-Type'), 'Testing the doGET method');

$request = new Request(array('method' => 'GET', 'URI' => '/feed/Article/RSS2'));
$request = new Request(array('method' => 'GET', 'URI' => '/feed/'.urlencode('Alpha\Model\Article').'/RSS2'));

$response = $front->process($request);

Expand Down

0 comments on commit 34ec786

Please sign in to comment.