Skip to content

Commit

Permalink
fixup! fixup! fixup! Add user-baser recommendation command (fixes #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Nov 27, 2017
1 parent b3bbe77 commit cf8aeef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Model/Command/UserRecommendationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function shouldUseCustomParameters(): void
'rotation_time' => $rotationTime,
'hard_rotation' => true,
'min_relevance' => UserRecommendation::MINIMAL_RELEVANCE_HIGH,
'filter' => 'foo = bar AND baz = ban',
'filter' => 'foo = bar and baz = ban',
],
],
$command->jsonSerialize()
Expand All @@ -77,13 +77,13 @@ public function shouldAssembleFilters(): void
->addFilter('bar = baz');

$this->assertSame(
'valid_to >= NOW AND foo = bar AND bar = baz',
'valid_to >= NOW and foo = bar and bar = baz',
$command->jsonSerialize()['parameters']['filter']
);

// Overwrite all filters
$command->setFilters(['my_filter = 1', 'other_filter = foo']);

$this->assertSame('my_filter = 1 AND other_filter = foo', $command->jsonSerialize()['parameters']['filter']);
$this->assertSame('my_filter = 1 and other_filter = foo', $command->jsonSerialize()['parameters']['filter']);
}
}

0 comments on commit cf8aeef

Please sign in to comment.