/**
  * @covers Mobileka\MosaicArray\MosaicArray::excludeByRule
  */
 public function test_excludes_target_elements_by_rule()
 {
     $fixture = ['key' => 'value', 1, 2, 3, 'numbers' => [1, 2, 3]];
     $ma = new MosaicArray($fixture);
     $expect = [1, 2, 3, 'numbers' => [1, 2, 3]];
     $result = $ma->excludeByRule(function ($key, $value) {
         return $key === 'key';
     });
     assertSame($expect, $result);
     $expect = $fixture;
     $result = $ma->excludeByRule(function ($key, $value) {
         return $value == 'nothing will be excluded';
     });
     assertSame($expect, $result);
     // exclude all numeric values
     $expect = ['key' => 'value', 'numbers' => [1, 2, 3]];
     $result = $ma->excludeByRule(function ($key, $value) {
         return is_numeric($value);
     });
     assertSame($expect, $result);
     // exclude all arrays
     $expect = ['key' => 'value', 1, 2, 3];
     $result = $ma->excludeByRule(function ($key, $value) {
         return is_array($value);
     });
     assertSame($expect, $result);
     // exclude all non-numeric keys
     $expect = [1, 2, 3];
     $result = $ma->excludeByRule(function ($key, $value) {
         return !is_numeric($key);
     });
     assertSame($expect, $result);
 }