public function testPassNoCollection($functionName) { $this->expectArgumentError(sprintf('%s() expects parameter 1 to be array or instance of Traversable', $functionName)); $functionName('invalidCollection', 'strlen'); }