/**
* Tests that assigning a whitelist to a query properly restricts the list of data fields that
* the query exposes.
*
* @return void
*/
public function testWhitelisting()
{
$data = array('foo' => 1, 'bar' => 2, 'baz' => 3);
$query = new Query(compact('data'));
$this->assertEqual($data, $query->data());
$query = new Query(compact('data') + array('whitelist' => array('foo', 'bar')));
$this->assertEqual(array('foo' => 1, 'bar' => 2), $query->data());
}