FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Removed 'query' wrapper in QueryStringOperator for es2 by mirko-bukilic · Pull Request #64 · g4code/data-mapper · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .php  (2) No extension  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TITLE = [data-mapper]

unit-tests:
@/bin/echo "${TITLE} unit test suite started..." \
&& XDEBUG_MODE=off php5.6 ./vendor/bin/phpunit -c tests/unit/phpunit.xml --coverage-html tests/unit/coverage
&& XDEBUG_MODE=off php ./vendor/bin/phpunit -c tests/unit/phpunit.xml --coverage-html tests/unit/coverage

integration-tests:
@/bin/echo "${TITLE} starting virtual machine ..." \
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ public function __construct($name, SingleValue $value)
public function format()
{
return [
QueryConnector::NAME_QUERY_STRING_QUERY =>
QueryConnector::NAME_QUERY_STRING =>
[
QueryConnector::NAME_QUERY_STRING =>
[
QueryConnector::NAME_QUERY_STRING_QUERY => $this->value->getValue(),
QueryConnector::ANALYZE_WILDCARD => true,
],
QueryConnector::NAME_QUERY_STRING_QUERY => $this->value->getValue(),
QueryConnector::ANALYZE_WILDCARD => true,
],
];
}
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
public function tearDown(): void
{
$this->comparisonFormatter = null;
$this->operatorMock = null;
$this->operatorMock = null;
}

public function testEqual()
Expand All @@ -51,8 +51,8 @@ public function testEqualCI()
['match' => [
'email' => [
'query' => 'text@example.com',
'type' => 'phrase'
]
'type' => 'phrase',
],
]],
$this->comparisonFormatter->format('email', $this->operatorMock, new SingleValue('text@example.com'))
);
Expand All @@ -69,8 +69,8 @@ public function testEqualCIEsVersion7()
$this->assertEquals(
['match' => [
'email' => [
'query' => 'text@example.com'
]
'query' => 'text@example.com',
],
]],
$comparisonFormatter->format('email', $this->operatorMock, new SingleValue('text@example.com'))
);
Expand Down Expand Up @@ -157,10 +157,10 @@ public function testTimeFromInMinutes()
$this->assertEquals([
'range' => [
'online' => [
'gt' => strtotime("-15 minute", time()),
'gt' => strtotime("-15 minute", time()),
'format' => 'epoch_second',
]
]
],
],
], $this->comparisonFormatter->format('online', $this->operatorMock, new SingleValue(15)));
}

Expand Down Expand Up @@ -214,12 +214,10 @@ public function testQueryString()

$this->assertEquals(
[
'query' => [
'query_string' => [
'query' => 'username: *test* OR email: *test*',
'analyze_wildcard' => true,
],
]
'query_string' => [
'query' => 'username: *test* OR email: *test*',
'analyze_wildcard' => true,
],
],
$this->comparisonFormatter
->format('', $this->operatorMock, new SingleValue('username: *test* OR email: *test*'))
Expand All @@ -237,8 +235,8 @@ public function testQueryStringVersion7()
$this->assertEquals(
[
'query_string' => [
'query' => 'username: *test* OR email: *test*'
]
'query' => 'username: *test* OR email: *test*',
],
],
$comparisonFormatter->format('', $this->operatorMock, new SingleValue('username: *test* OR email: *test*'))
);
Expand Down

Back | FazBrowse Home | New Git URL