Skip to content

Commit

Permalink
Test load events
Browse files Browse the repository at this point in the history
  • Loading branch information
tattali committed May 4, 2019
1 parent cd3eea6 commit 07996de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder();
$treeBuilder->root('calendar');

return $treeBuilder;
}
}
2 changes: 1 addition & 1 deletion src/Entity/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function addOption(string $name, $value): void

public function removeOption(string $name)
{
if (!isset($this->options[$name]) && !array_key_exists($name, $this->options)) {
if (!isset($this->options[$name]) && !\array_key_exists($name, $this->options)) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/CalendarControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testItProvidesAnEventsFeedForACalendar()
{
$this->request->get('start')->willReturn('2016-03-01');
$this->request->get('end')->willReturn('2016-03-19 15:11:00');
$this->request->get('filters', [])->willReturn([]);
$this->request->get('filters', '{}')->willReturn('{}');

$this->calendarEvent->getEvents()->willReturn([$this->event]);

Expand Down Expand Up @@ -82,7 +82,7 @@ public function testItNotFindAnyEvents()
{
$this->request->get('start')->willReturn('2016-03-01');
$this->request->get('end')->willReturn('2016-03-19 15:11:00');
$this->request->get('filters', [])->willReturn([]);
$this->request->get('filters', '{}')->willReturn('{}');

$this->calendarEvent->getEvents()->willReturn([$this->event]);

Expand Down

0 comments on commit 07996de

Please sign in to comment.