/**
* @group DataModel
* @group CollectionMin
* @covers FOF30\Model\DataModel\Collection::min
*/
public function testMin()
{
$items = $this->buildCollection();
$collection = new Collection($items);
$result = $collection->min('foftest_bare_id');
// Let's get the maximum value directly from the db
$db = \JFactory::getDbo();
$query = $db->getQuery(true)->select('MIN(foftest_bare_id)')->from('#__foftest_bares');
$min = $db->setQuery($query)->loadResult();
$this->assertEquals($min, $result, 'Collection::min Failed to return lowest value');
}