jjzjj

let 中的 phpspec 标量值

我正在尝试将let函数与标量值一起使用。我的问题是价格是Double,我预计是int5。functionlet(Buyable$buyable,$price,$discount){$buyable->getPrice()->willReturn($price);$this->beConstructedWith($buyable,$discount);}functionit_returns_the_same_price_if_discount_is_zero($price=5,$discount=0){$this->getDiscountPrice()->shouldReturn(5);