예제 #1
0
 /**
  * @dataProvider arraysHaveSameValuesProvider()
  */
 public function testArraysHaveSameValues($first, $second, $res)
 {
     $this->assertEquals($res, arrays_have_same_values($first, $second));
     $this->assertEquals($res, arrays_have_same_values($second, $first));
 }
예제 #2
0
 private function patternDidntChange(Pattern $pattern, array $newData)
 {
     return $pattern->regex->text == $newData['regex'] && arrays_have_same_values($pattern->sections()->lists('id')->all(), $newData['section_ids']) && arrays_have_same_values($pattern->prefixes()->lists('id')->all(), $newData['prefix_ids']);
 }