public function let(DateTransformer $dateTransformer, SharedStrings $sharedStrings, Styles $styles) { $styles->get('1')->willReturn(Styles::FORMAT_DEFAULT); $styles->get('2')->willReturn(Styles::FORMAT_DATE); $dateTransformer->transform(Argument::type('string'))->will(function ($args) { return 'date_' . $args[0]; }); $sharedStrings->get(Argument::type('string'))->will(function ($args) { return 'shared_' . $args[0]; }); $this->beConstructedWith($dateTransformer, $sharedStrings, $styles); }