Skip to content
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

Merged

Conversation

wachterjohannes
Copy link
Member

@wachterjohannes wachterjohannes commented Mar 22, 2017

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets none
Related issues/PRs none
License MIT
Documentation PR none

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

  • Tests for ArticleSubscriber

@wachterjohannes wachterjohannes force-pushed the feature/routable-behavior branch from 3a1f052 to 0e63c2d Compare March 22, 2017 12:30
@@ -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'));
Copy link
Member

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'));
Copy link
Member

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'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@wachterjohannes wachterjohannes added this to the 0.4.0 milestone Mar 24, 2017
@alexander-schranz alexander-schranz merged commit 61c51fd into sulu:develop Mar 24, 2017
@wachterjohannes wachterjohannes deleted the feature/routable-behavior branch March 24, 2017 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants