assertEquals('SELECT COUNT(*) FROM a_table', Count::all('a_table'), 'SELECT statement not generated correctly'); } public function testByFieldsSucceeds() { Configuration::$mode = Mode::SQLite; try { $this->assertEquals("SELECT COUNT(*) FROM somewhere WHERE data->>'errors' > :errors", Count::byFields('somewhere', [Field::GT('errors', 10, ':errors')])); } finally { Configuration::$mode = null; } } }