Commit a8d721eb authored by totten's avatar totten

(#174) NaiveMultipleTrait - Fix validation of oddball iterables

parent e73e7ec8
......@@ -113,7 +113,7 @@ trait CRM_Utils_Cache_NaiveMultipleTrait {
* @throws \CRM_Utils_Cache_InvalidArgumentException
*/
private function assertIterable($func, $keys) {
if (!is_array($keys) || $keys instanceof Traversable) {
if (!is_array($keys) && !($keys instanceof Traversable)) {
throw new CRM_Utils_Cache_InvalidArgumentException("$func expects iterable input");
}
}
......
......@@ -46,15 +46,6 @@ abstract class E2E_Cache_CacheTestCase extends \Cache\IntegrationTests\LegacySim
parent::setUpBeforeClass();
}
protected function setUp() {
parent::setUp();
// Testing on PHP 5.5 and having trouble finding a test that correctly
// detects generators.
$this->skippedTests['testGetMultipleWithGenerator'] = 1;
$this->skippedTests['testSetMultipleWithGenerator'] = 1;
$this->skippedTests['testDeleteMultipleGenerator'] = 1;
}
public function testBasicUsageWithLongKey() {
if (isset($this->skippedTests[__FUNCTION__])) {
$this->markTestSkipped($this->skippedTests[__FUNCTION__]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment