Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix test the right way affecting Merchant constructor rather than test

  • Loading branch information...
commit 917c4155fba857aa875a4041dc2c0f936a3d133c 1 parent 36aea09
@cordoval cordoval authored iampersistent committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/Vespolina/Entity/Product/Merchandise.php
View
10 lib/Vespolina/Entity/Product/Merchandise.php
@@ -30,10 +30,12 @@ public function __construct(ProductInterface $product)
$rc = new \ReflectionClass('Vespolina\Entity\Product\BaseProduct');
$properties = $rc->getProperties();
foreach ($properties as $property) {
- $property->setAccessible(true);
- $value = $property->getValue($product);
- $property->setValue($this, $value);
- $property->setAccessible(false);
+ if ($property->getName() !== 'assets') {
+ $property->setAccessible(true);
+ $value = $property->getValue($product);
+ $property->setValue($this, $value);
+ $property->setAccessible(false);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.