在PHPUnit mock with()子句中测试多个数组键的最佳方法是什么?
例如,要测试方法是否调用第二个参数是包含'foo'键的数组:
$this->stubDispatcher->expects($this->once())
->method('send')
->with('className', $this->arrayHasKey('foo'));
Run Code Online (Sandbox Code Playgroud)
我想要做的是像$this->arrayHasKey('foo', 'bar')实际上没有匹配数组的确切内容.