【Laravel5.6】cacheヘルパ関数で、テストのshouldReceiveが動かない対応【327日目】

結論 cache('key')を使った場合、withの中身を with('key', null)にする。 サンプルコード public function testBasicExample() { Cache::shouldReceive('get') ->with('key', null) ->andReturn('value'); $this->visit('/cache') ->see('value'); } 公式ドキュメントがちょっと違う ファサード 5.6 Laravel ファサードと…