コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 /**
  * 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);
 }