/**
* @group DataModel
* @group CollectionIntersect
* @covers FOF30\Model\DataModel\Collection::intersect
*/
public function testIntersect()
{
$config = array('idFieldName' => 'foftest_bare_id', 'tableName' => '#__foftest_bares');
$model = $this->getMock('\\FOF30\\Tests\\Stubs\\Model\\DataModelStub', array('getState'), array(static::$container, $config));
$collection1 = new Collection($model->getItemsArray(0, 2));
$collection2 = new Collection($model->getItemsArray(0, 1));
$merge = $collection1->intersect($collection2);
$this->assertInstanceOf('\\FOF30\\Model\\DataModel\\Collection', $merge, 'Collection::intersect Should return an instance of Collection');
$this->assertCount(1, $merge, 'Collection::intersect Failed to intersect two arrays');
}