Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
232
Issues
232
List
Boards
Labels
Service Desk
Milestones
Merge Requests
36
Merge Requests
36
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Compare Revisions
efa3a25fb69c942f556fee58113a1efe0198eefa...136069766f249df7a5ed52b514a0d57f74f75f9a
Source
136069766f249df7a5ed52b514a0d57f74f75f9a
Select Git revision
...
Target
efa3a25fb69c942f556fee58113a1efe0198eefa
Select Git revision
Compare
Commits (2)
(chore) Move the null defaults to the query builder, add it's spec test -
#631
· c77b883c
Guy Thouret
authored
2 hours ago
c77b883c
(chore) Comment non-implemented test in NormalizeDatesDelegateSpec -
#631
· 13606976
Guy Thouret
authored
2 hours ago
13606976
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
20 deletions
+52
-20
Core/Boost/Campaigns/ElasticRepository.php
Core/Boost/Campaigns/ElasticRepository.php
+2
-15
Core/Boost/Campaigns/ElasticRepositoryQueryBuilder.php
Core/Boost/Campaigns/ElasticRepositoryQueryBuilder.php
+11
-1
Spec/Core/Boost/Campaigns/Delegates/NormalizeDatesDelegateSpec.php
.../Boost/Campaigns/Delegates/NormalizeDatesDelegateSpec.php
+4
-4
Spec/Core/Boost/Campaigns/ElasticRepositoryQueryBuilderSpec.php
...ore/Boost/Campaigns/ElasticRepositoryQueryBuilderSpec.php
+35
-0
No files found.
Core/Boost/Campaigns/ElasticRepository.php
View file @
13606976
...
...
@@ -43,16 +43,7 @@ class ElasticRepository
{
$this
->
opts
=
array_merge
([
'limit'
=>
12
,
'from'
=>
0
,
'offset'
=>
null
,
'sort'
=>
'asc'
,
'type'
=>
null
,
'guid'
=>
null
,
'owner_guid'
=>
null
,
'entity_urn'
=>
null
,
'state'
=>
null
,
'rating'
=>
null
,
'quality'
=>
null
,
'from'
=>
0
],
$opts
);
$this
->
queryBuilder
->
setOpts
(
$opts
);
...
...
@@ -111,11 +102,7 @@ class ElasticRepository
{
$this
->
opts
=
array_merge
([
'limit'
=>
24
,
'from'
=>
0
,
'rating'
=>
null
,
'quality'
=>
null
,
'type'
=>
null
,
'sort'
=>
'asc'
,
'from'
=>
0
],
$opts
);
$this
->
queryBuilder
->
setOpts
(
$this
->
opts
);
...
...
This diff is collapsed.
Click to expand it.
Core/Boost/Campaigns/ElasticRepositoryQueryBuilder.php
View file @
13606976
...
...
@@ -17,7 +17,17 @@ class ElasticRepositoryQueryBuilder
public
function
reset
()
{
$this
->
opts
=
[];
$this
->
opts
=
[
'type'
=>
null
,
'guid'
=>
null
,
'owner_guid'
=>
null
,
'entity_urn'
=>
null
,
'state'
=>
null
,
'rating'
=>
null
,
'quality'
=>
null
,
'offset'
=>
null
,
'sort'
=>
'asc'
];
$this
->
must
=
[];
$this
->
mustNot
=
[];
$this
->
sort
=
[];
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Boost/Campaigns/Delegates/NormalizeDatesDelegateSpec.php
View file @
13606976
...
...
@@ -57,10 +57,10 @@ class NormalizeDatesDelegateSpec extends ObjectBehavior
$this
->
shouldThrow
(
CampaignException
::
class
)
->
during
(
'onCreate'
,
[
$campaign
]);
}
public
function
it_should_validate_dates_are_valid_against_campaign_budget_on_update
()
{
// TODO: Not Implemented yet
}
/*
public function it_should_validate_dates_are_valid_against_campaign_budget_on_update()
{
// TODO: Not Implemented yet
}*/
public
function
it_should_not_change_start_date_if_campaign_has_started_on_update
(
Campaign
$campaign
,
Campaign
$campaignRef
)
{
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Boost/Campaigns/ElasticRepositoryQueryBuilderSpec.php
0 → 100644
View file @
13606976
<?php
namespace
Spec\Minds\Core\Boost\Campaigns
;
use
Minds\Core\Boost\Campaigns\ElasticRepositoryQueryBuilder
;
use
PhpSpec\ObjectBehavior
;
class
ElasticRepositoryQueryBuilderSpec
extends
ObjectBehavior
{
public
function
it_is_initializable
()
{
$this
->
shouldHaveType
(
ElasticRepositoryQueryBuilder
::
class
);
}
public
function
it_should_reset
()
{
$this
->
reset
();
}
public
function
it_should_make_a_query
()
{
$query
=
[
'query'
=>
[
'bool'
=>
[
'must'
=>
[],
'must_not'
=>
[],
],
],
'sort'
=>
[
'@timestamp'
=>
'asc'
,
],
];
$this
->
query
()
->
shouldReturn
(
$query
);
}
}
This diff is collapsed.
Click to expand it.