public function testFilteringQuery()
{
$connection = \Mockery::mock('\\Pheasant\\Database\\Mysqli\\Connection');
$connection->shouldReceive('execute')->with('SELECT llamas FROM animals')->once();
$filter = new FilterChain();
$filter->onQuery(function ($sql) {
return 'SELECT llamas FROM animals';
});
$filter->execute('SELECT 1', function ($sql) use($connection) {
$connection->execute($sql);
});
$this->assertTrue(true);
}