Skip to content

Instantly share code, notes, and snippets.

@jamescowie
Created July 20, 2014 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamescowie/cdfe90d9557e467ab008 to your computer and use it in GitHub Desktop.
Save jamescowie/cdfe90d9557e467ab008 to your computer and use it in GitHub Desktop.
Custom attribute assertion
$model = \Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
$model->setHighestOnlinePrice($highestPrice); // This attribute does NOT exist in Magento
$model->save();
PHPUnit_Framework_Assert::assertTrue($model->offsetExists('highest_online_price'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment