/**
  * Product detail render test maker
  */
 public function testProductDetailWhenRegisterMakerAndMakerUrl()
 {
     $productId = $this->ProductMaker->getId();
     $crawler = $this->client->request('GET', $this->app->url('product_detail', array('id' => $productId)));
     $html = $crawler->filter('.item_detail')->html();
     $this->assertContains($this->ProductMaker->getMaker()->getName(), $html);
     $this->assertContains($this->ProductMaker->getMakerUrl(), $html);
 }
示例#2
0
 /**
  * Render html of the product detail.
  *
  * @param Response     $response
  * @param ProductMaker $ProductMaker
  *
  * @return mixed|string
  */
 private function renderProductDetail(Response $response, ProductMaker $ProductMaker)
 {
     $parts = $this->app->renderView('Maker/Resource/template/default/maker.twig', array('maker_name' => $ProductMaker->getMaker()->getName(), 'maker_url' => $ProductMaker->getMakerUrl()));
     $html = $response->getContent();
     $html = $this->renderPosition($html, $parts, $this->makerTag);
     return $html;
 }