public function testShouldReturnsABaseFilter() { $filter = new Filter(); $this->assertInstanceOf(BaseFilter::class, $filter->should()); }
public function testFindByShouldNotEqualTest() { $filter = new Filter(); $filter->must()->contain('name', 'John Doe'); $filter->should()->notEqual('name', 'Shigeru Miyamoto'); $results = $this->repository->findBy($filter); $this->assertEquals(3, count($results)); }
public function testFindByShouldNotRangeTest() { $filter = new Filter(); $filter->must()->contain('name', 'Hideo Kojima'); $filter->should()->notRange('totalOrders', 2, 4); $results = $this->repository->findBy($filter); $this->assertEquals(1, count($results)); }
public function testItShouldBeEmpty() { $filter = new Filter(); $filter->should()->empty('name'); $results = InMemoryFilter::filter($this->data, $filter); $this->assertEquals(4, count($results)); }