public function testMatchProductByNotExistingTaxonomyNode()
 {
     $productSpec = new ProductSpecification();
     $productSpec->withTaxonomyNodeName('categoryXYZ');
     $products = $this->productGateway->findAll($productSpec);
     if (is_array($products)) {
         $count = count($products);
     } else {
         $count = $products->count();
     }
     $this->assertEquals(0, $count);
 }
 public function testBrandSpecification()
 {
     $this->dbSetUp();
     $brand = new Brand();
     $brand->setName('brand');
     $this->brandGateway->persistBrand($brand);
     $newProduct = new Product();
     $newProduct->addBrand($brand);
     $this->productGateway->persistProduct($newProduct);
     $this->productGateway->flush();
     $spec = new ProductSpecification();
     $spec->withBrand($brand);
     $product = $this->productGateway->findOne($spec);
     $this->assertEquals($newProduct, $product);
 }