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