dongmubi4375 2014-02-28 19:35
浏览 25
已采纳

当函数方法被打字时,php Mockery抛出意外的“必须实现接口”异常

I'm using Mockery to unit test an admittedly edge case. It's failing and I don't think it should fail, so there could be a bug within Mockery.

Consider an object that has a method. The method has an argument signature where the first argument is typehinted and defaults to null. The second argument does not have a default.

When the method is called on the object with null as first argument, it works fine. When the method is called on a Mocked object with null as the first argument, it fails.

Please see sample code here: https://gist.github.com/awei01/9278119

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退