Ejemplo n.º 1
0
 /**
  * @test
  */
 public function itShouldThrowProductAlreadyExistsExceptionWhenAddAProductThatExists()
 {
     $this->setExpectedException(ProductAlreadyExistsException::class);
     $merchant1 = new Merchant('Joyeria Baguette', 'Address');
     $product = FakeProductBuilder::buildProductForMerchant($merchant1);
     $merchant1->addProduct($product)->addProduct($product);
 }
 /**
  * @return array
  */
 private function buildFindAllMerchantRepositoryResponse()
 {
     $merchant1 = new Merchant('Joyeria Baguette', 'Address');
     $merchant1->addProduct(FakeProductBuilder::buildProductForMerchant($merchant1))->addProduct(FakeProductBuilder::buildProductForMerchant($merchant1));
     $merchant2 = new Merchant('Deportes Placídia', 'Address2');
     $merchant2->addProduct(FakeProductBuilder::buildProductForMerchant($merchant2));
     return [$merchant1, $merchant2];
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function itShouldHasUuidIdentifier()
 {
     $product = FakeProductBuilder::build();
     Assertion::uuid($product->id());
 }