public function testOnProductEdit() { $formView = new FormView(); $templateHtml = 'template_html'; /** @var \PHPUnit_Framework_MockObject_MockObject|\Twig_Environment $environment */ $environment = $this->getMock('\\Twig_Environment'); $environment->expects($this->once())->method('render')->with('OroB2BPricingBundle:Product:prices_update.html.twig', ['form' => $formView])->willReturn($templateHtml); $event = $this->createEvent($environment, $formView); $this->listener->onProductEdit($event); $scrollData = $event->getScrollData()->getData(); $this->assertScrollDataPriceBlock($scrollData, $templateHtml); }