-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracted routable-behavior from article-subscriber #111
Extracted routable-behavior from article-subscriber #111
Conversation
b62b301
to
66bd233
Compare
3a1f052
to
0e63c2d
Compare
@@ -86,7 +86,7 @@ public function testPost($title = 'Test-Article', $template = 'default') | |||
$this->assertEquals($title, $response['title']); | |||
$this->assertEquals(self::$typeMap[$template], $response['articleType']); | |||
$this->assertEquals($template, $response['template']); | |||
$this->assertEquals(new \DateTime('2016-01-01'), new \DateTime($response['authored'])); | |||
$this->assertEquals('2016-01-01', (new \DateTime($response['authored']))->format('Y-m-d')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would use the classic way here: date('Y-m-d', strtotime($response['authored']))
@@ -130,7 +130,7 @@ public function testPut($title = 'Sulu is awesome', $locale = 'de', $article = n | |||
$response = json_decode($client->getResponse()->getContent(), true); | |||
$this->assertNotEquals($article['title'], $response['title']); | |||
$this->assertEquals($title, $response['title']); | |||
$this->assertEquals(new \DateTime('2016-01-01'), new \DateTime($response['authored'])); | |||
$this->assertEquals('2016-01-01', (new \DateTime($response['authored']))->format('Y-m-d')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -155,7 +155,7 @@ public function testGetGhost() | |||
$response = json_decode($client->getResponse()->getContent(), true); | |||
$this->assertNotEquals($article['title'], $response['title']); | |||
$this->assertEquals($title, $response['title']); | |||
$this->assertEquals(new \DateTime('2016-01-01'), new \DateTime($response['authored'])); | |||
$this->assertEquals('2016-01-01', (new \DateTime($response['authored']))->format('Y-m-d')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
What's in this PR?
This PR improves the separation of concerns by extracting the route-stuff from the article subscriber.
Why?
This part will be used also for the pages afterwards in the multi-page feature.
To Do
ArticleSubscriber