array('label' => 'google')), array($idcol => array('label' => 'ask')), array($idcol => array('label' => 'piwik')), array($idcol => array('label' => 'yahoo')), array(Row::METADATA => array('label' => 'amazon')), array($idcol => array('label' => '2389752/47578949')), array($idcol => array('label' => 'Q*(%&*("$&%*(&"$*")"))')) ); $table->addRowsFromArray($rows); $rowIds = array_keys($rows); $pattern = $test[0]; $expectedRows = $test[1]; $rowToDelete = array_diff($rowIds, $expectedRows); $expectedtable = clone $table; $expectedtable->deleteRows($rowToDelete); $filteredTable = clone $table; $filteredTable->filter('Pattern', array('label', $pattern)); $this->assertEquals($expectedtable->getRows(), $filteredTable->getRows()); } }