public function it_can_run_nested_async_widget_with_dot_notation(Wrapper $wrapper) { $config = ['count' => 5]; $params = [$config]; $wrapper->csrf_token()->willReturn('token_stub'); $this->run('profile.testNamespace.testFeed', $config)->shouldReturn("<span id='async-widget-container-1'><script>\$.post('/brainkit/async-widget', " . $this->mockProduceJavascriptData('Profile\\testNamespace\\testFeed', $params) . ", function(data) { \$('#async-widget-container-1').replaceWith(data); })</script></span>"); }
public function it_can_run_nested_widgets_with_dot_notation(Wrapper $wrapper) { $wrapper->appCall(Argument::any(), Argument::any())->willReturn(call_user_func_array([new TestFeed([]), 'run'], [])); $this->run('profile.testNamespace.testFeed', ['slides' => 5])->shouldReturn("Feed was executed with \$slides = 6"); }