Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/dev/tests/integration/testsuite/Magento/Tax/_files/
Upload File :
Current File : //home/rtorresani/www/dev/tests/integration/testsuite/Magento/Tax/_files/report_tax.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// refresh report statistics
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
/** @var \Magento\Tax\Model\ResourceModel\Report\Tax $reportResource */
$reportResource = $objectManager->create(\Magento\Tax\Model\ResourceModel\Report\Tax::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;
}