public function testKIntersectAcceptsCallback() { $xao = new XArray(['x' => 1, 'ab' => 2, 'z' => 3]); $test = new CallbackTestMethods(); $obj = $xao->kintersect(['a' => 4], [$test, 'length_compare']); $this->assertEquals(['x' => 1], (array) $obj); }
public function testKIntersectAcceptsCallback() { $xao = new XArray(['x' => 1, 'ab' => 2, 'z' => 3]); $test = new CallbackTestMethods(); $obj = $xao->kintersect(['a' => 4], [$test, 'length_compare']); $this->assertEquals(['x' => 1], (array) $obj); }