/** * Checks if the string contains all of the provided needles. * * @param array(string|Mol_DataType_String) $needles * @return boolean True if the string contains all needles, false otherwise. */ public function containsAll(array $needles) { $needles = $this->toValues($needles); return Mol_Util_String::containsAll($this->value, $needles); }
/** * Ensures that containsAll() returns true if an empty list of needles is provided. */ public function testContainsAllReturnsTrueIfListOfNeedlesIsEmpty() { $result = Mol_Util_String::containsAll('abc', array()); $this->assertTrue($result); }