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); }