Пример #1
0
 /**
  * @test
  */
 public function itShouldHasUuidIdentifier()
 {
     $merchant = new Merchant('Joyeria Baguette', 'Address');
     Assertion::uuid($merchant->id());
 }
Пример #2
0
 /**
  * @param $name
  */
 private function setName($name)
 {
     Assertion::notBlank($name, 'Merchant name is required');
     Assertion::string($name, 'Merchant name must be string type');
     $this->name = $name;
 }
Пример #3
0
 /**
  * @param $price
  */
 private function setPrice($price)
 {
     Assertion::float($price, 'Price must be a float value');
     $this->price = $price;
 }
Пример #4
0
 /**
  * @test
  */
 public function itShouldHasUuidIdentifier()
 {
     $product = FakeProductBuilder::build();
     Assertion::uuid($product->id());
 }