Source

						public function testCalculation() {
		$options = array(
			'type' => 'read',
			'model' => 'lithium\tests\mocks\data\model\MockDatabasePost'
		);
		$this->expectException('Undefined offset: 0');
		$result = $this->db->calculation('count', new Query($options), $options);
		$expected = 'SELECT COUNT(*) as count FROM {mock_database_posts} AS {MockDatabasePost};';
		$this->assertEqual($expected, $this->db->sql);
	}