and return the post

This commit is contained in:
John Bintz 2010-01-30 10:55:39 -05:00
parent ca5d2708d7
commit 037669c63e
2 changed files with 9 additions and 1 deletions

View File

@ -54,6 +54,8 @@ class ComicPressTagBuilder {
return strtotime($this->post->post_date);
case 'permalink':
return get_permalink($this->post->ID);
case 'post':
return $this->post;
default:
$methods = $this->parse_method($method);
if (!empty($methods)) {

View File

@ -96,7 +96,13 @@ class ComicPressTagBuilderTest extends PHPUnit_Framework_TestCase {
array('id', 1),
array('title', 'Post title'),
array('timestamp', strtotime('2010-01-01')),
array('permalink', 'the-slug')
array('permalink', 'the-slug'),
array('post', (object)array(
'ID' => 1,
'post_title' => 'Post title',
'post_date' => '2010-01-01',
'guid' => 'the-slug',
))
);
}