コード例 #1
0
 public function it_should_render_defaults_when_no_params_provided(ContainerInterface $container, EngineInterface $templating, Response $response, WidgetModelInterface $widgetModel)
 {
     $widgetModel->getParameters()->willReturn([]);
     $this->beConstructedWith($widgetModel, $templating);
     $templating->render('widgets/adsense.html.twig', ['style' => 'display:block', 'ad_client' => null, 'ad_test' => 'off', 'ad_slot' => null, 'ad_format' => 'auto'])->willReturn($response);
     $this->render()->shouldReturn($response);
 }
コード例 #2
0
 public function let(WidgetModelInterface $widgetModel)
 {
     $widgetModel->getParameters()->willReturn(['html_body' => 'sample html']);
     $this->beConstructedWith($widgetModel);
 }