-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19: Filter Query Options
* pr-19: Remove php 7.1 from travis config improved tests to be compatible with phpunit 8.0 added tests for creating query with filterQueries options added filterQueries options fixed docker config
- Loading branch information
Showing
22 changed files
with
254 additions
and
123 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -18,7 +18,6 @@ matrix: | |
- php: 7.2 | ||
env: COVERAGE=yes | ||
include: | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
- php: 7.2 | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
|
||
namespace SolrTest\Bridge; | ||
|
||
use PHPUnit\Framework\MockObject\MockObject; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
|
||
use Interop\Container\ContainerInterface; | ||
use Solr\Bridge\Manager; | ||
|
@@ -21,15 +24,15 @@ | |
* @author Mathias Gelhausen <[email protected]> | ||
* @author Miroslav Fedeleš <[email protected]> | ||
* @since 0.26 | ||
* @covers Solr\Bridge\Manager | ||
* @covers \Solr\Bridge\Manager | ||
* @requires extension solr | ||
* @package SolrTest\Bridge | ||
*/ | ||
class ManagerTest extends \PHPUnit_Framework_TestCase | ||
class ManagerTest extends TestCase | ||
{ | ||
/** | ||
* Mock for ConnectOption class | ||
* @var \PHPUnit_Framework_MockObject_MockObject | ||
* @var MockObject | ||
*/ | ||
protected $option; | ||
|
||
|
@@ -38,7 +41,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase | |
*/ | ||
protected $target; | ||
|
||
public function setUp() | ||
protected function setUp(): void | ||
{ | ||
$option = $this->getMockBuilder(ConnectOption::class) | ||
->getMock() | ||
|
This file contains 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 |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
|
||
namespace SolrTest\Bridge; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
use Interop\Container\ContainerInterface; | ||
use Solr\Bridge\ResultConverter; | ||
use Core\Repository\RepositoryService; | ||
|
@@ -23,11 +25,11 @@ | |
* @author Anthonius Munthi <[email protected]> | ||
* @author Miroslav Fedeleš <[email protected]> | ||
* @since 0.26 | ||
* @covers Solr\Bridge\ResultConverter | ||
* @covers \Solr\Bridge\ResultConverter | ||
* @package SolrTest\Bridge | ||
* @coversDefaultClass \Solr\Bridge\ResultConverter | ||
*/ | ||
class ResultConverterTest extends \PHPUnit_Framework_TestCase | ||
class ResultConverterTest extends TestCase | ||
{ | ||
/** | ||
* @covers ::factory | ||
|
@@ -57,11 +59,12 @@ public function testFactory() | |
* @covers ::convert | ||
* @depends testFactory | ||
* @dataProvider invalidResponseData | ||
* @expectedException \InvalidArgumentException | ||
* @expectedExceptionMessage invalid response | ||
*/ | ||
public function testConvertThrowsExceptionOnInvalidResponseData($responseData, array $data) | ||
{ | ||
$this->expectException(\InvalidArgumentException::class); | ||
$this->expectExceptionMessage('invalid response'); | ||
|
||
list ($resultConverter) = $data; | ||
|
||
$filter = $this->getMockBuilder(AbstractPaginationQuery::class) | ||
|
@@ -154,7 +157,7 @@ public function testConvert(array $data) | |
->willReturn($repository); | ||
|
||
$proxies = $resultConverter->convert($filter, $response); | ||
$this->assertInternalType('array', $proxies); | ||
$this->assertIsArray($proxies); | ||
$this->assertCount($expectedCount, $proxies); | ||
$this->assertContains($proxy1, $proxies); | ||
$this->assertContains($proxy2, $proxies); | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.