Skip to content

Commit

Permalink
Add test to add components when creating product.
Browse files Browse the repository at this point in the history
  • Loading branch information
brightantwiboasiako committed Mar 11, 2021
2 parents cfc9a1e + 2dec730 commit 0492ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataType/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public function setBrand(string $brandName)
*/
public function setProductType(string $type)
{
if (!in_array($type, [self::TYPE_STANDARD, self::TYPE_VIRTUAL])) {
throw new InvalidArgumentException('The type field must be ' . self::TYPE_STANDARD . ' or ' . self::TYPE_VIRTUAL);
if (!in_array($type, [self::TYPE_STANDARD, self::TYPE_VIRTUAL, self::TYPE_BUNDLE])) {
throw new InvalidArgumentException('The type field must be ' . self::TYPE_STANDARD . ', ' . self::TYPE_VIRTUAL . ', or ' . self::TYPE_BUNDLE);
}

$this->type = $type;
Expand Down

0 comments on commit 0492ee8

Please sign in to comment.