Example #1
0
 protected function getTestFeaturedProduct()
 {
     $fProduct = new XLite\Module\CDev\FeaturedProducts\Model\FeaturedProduct();
     $fProduct->setProduct($this->getProduct());
     $fProduct->setCategory($this->getCategory());
     $fProduct->setOrderBy(5);
     \XLite\Core\Database::getEM()->persist($fProduct);
     \XLite\Core\Database::getEM()->flush();
     $this->assertNotNull($fProduct, 'getTestFeaturedProduct() returned null, object expected');
     $this->featuredProduct = $fProduct;
     return $fProduct;
 }
Example #2
0
 protected function getTestFeaturedProduct()
 {
     $fProduct = new XLite\Module\CDev\FeaturedProducts\Model\FeaturedProduct();
     $fProduct->setProduct($this->getProduct());
     $fProduct->setCategory($this->getCategory());
     $fProduct->setOrderBy(5);
     \XLite\Core\Database::getEM()->persist($fProduct);
     \XLite\Core\Database::getEM()->flush();
     $this->fp = $fProduct;
     return $fProduct;
 }