| Current Path : /home/rtorresani/www/dev/tests/integration/testsuite/Magento/Sales/_files/ |
| Current File : //home/rtorresani/www/dev/tests/integration/testsuite/Magento/Sales/_files/report_invoiced.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// refresh report statistics
/** @var \Magento\Sales\Model\ResourceModel\Report\Invoiced $reportResource */
$reportResource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
\Magento\Sales\Model\ResourceModel\Report\Invoiced::class
);
$reportResource->beginTransaction();
// prevent table truncation by incrementing the transaction nesting level counter
try {
$reportResource->aggregate();
$reportResource->commit();
} catch (\Exception $e) {
$reportResource->rollBack();
throw $e;
}