Esempio n. 1
0
 function test_except()
 {
     $data = array('name' => 'Tonya', 'favorite_team' => 'Brewers');
     $expected = array('favorite_team' => 'Brewers');
     $this->assertEquals($expected, Arr::except($data, array('name')));
     $this->assertEquals($expected, wpdevsclub_array_except($data, array('name')));
 }
Esempio n. 2
0
 /**
  * Get all of the given array except for a specified array of items.
  *
  * @param  array  $array
  * @param  array|string  $keys
  * @return array
  */
 function wpdevsclub_array_except($array, $keys)
 {
     return Arr::except($array, $keys);
 }