From baf0711b7b83eb267e4d7a77267617787be87385 Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Mon, 12 Aug 2024 11:44:10 +0200 Subject: [PATCH] Remove unneeded code in tests This PR removes the check for a `functions.php` file which is not needed in Magento 2. Unit tests should be run similarly like `vendor/bin/phpunit --configuration dev/tests/unit/phpunit.xml.dist vendor/buckaroo/magento2/Test/Unit`. This way, the PHP settings should also be moved to the PHPUnit configuration file and not be part of the tests. --- Test/BaseTest.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Test/BaseTest.php b/Test/BaseTest.php index b1be7a17f..fcb277b90 100644 --- a/Test/BaseTest.php +++ b/Test/BaseTest.php @@ -47,19 +47,6 @@ public function getInstance(array $args = []) public function setUp() { - /** - * Require functions.php to be able to use the translate function - */ - if (strpos(__DIR__, 'vendor') === false) { - include_once __DIR__ . '/../../../../functions.php'; - } else { - include_once __DIR__ . '/../../../../app/functions.php'; - } - - ini_set('error_reporting', E_ALL); - ini_set('display_errors', '1'); - ini_set('display_startup_errors', '1'); - $this->objectManagerHelper = new ObjectManager($this); }