| 1 | <?php |
||
| 11 | class SearchProviderTest extends TestCase |
||
| 12 | {
|
||
| 13 | public function testReturnsCollection() |
||
| 14 | {
|
||
| 15 | $mock = $this->getMockForAbstractClass(SearchProvider::class); |
||
| 16 | |||
| 17 | $mock->expects($this->once()) |
||
| 18 | ->method('searchRequest')
|
||
| 19 | ->will($this->returnValue(new stdClass)); |
||
| 20 | |||
| 21 | $mock->expects($this->once()) |
||
| 22 | ->method('getCollection')
|
||
| 23 | ->will($this->returnValue(new Collection)); |
||
| 24 | |||
| 25 | $result = $mock->search('foo');
|
||
| 26 | $this->assertInstanceOf(ICollection::class, $result); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |