Skip to content

Commit

Permalink
Removes unused method from Tracker class (#22276)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored Jun 6, 2024
1 parent a694468 commit c2eac03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
16 changes: 0 additions & 16 deletions core/Tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,22 +325,6 @@ public static function setTestEnvironment($args = null, $requestMethod = null)
}
}

protected function loadTrackerPlugins()
{
try {
$pluginManager = PluginManager::getInstance();
$pluginsTracker = $pluginManager->loadTrackerPlugins();

$this->logger->debug("Loading plugins: { {plugins} }", [
'plugins' => implode(", ", $pluginsTracker),
]);
} catch (Exception $e) {
$this->logger->error('Error loading tracker plugins: {exception}', [
'exception' => $e,
]);
}
}

private function handleFatalErrors()
{
register_shutdown_function(function () {
Expand Down
12 changes: 2 additions & 10 deletions plugins/BulkTracking/tests/Integration/TrackerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,22 @@
use Piwik\Tracker;
use Piwik\Tests\Framework\Mock\Tracker\RequestSet;

class TestIntegrationTracker extends Tracker
{
protected function loadTrackerPlugins()
{
// if we reload the plugins we would lose the injected data :(
}
}

/**
* @group TrackerTest
* @group Tracker
*/
class TrackerTest extends BulkTrackingTestCase
{
/**
* @var TestIntegrationTracker
* @var Tracker
*/
private $tracker;

public function setUp(): void
{
parent::setUp();

$this->tracker = new TestIntegrationTracker();
$this->tracker = new Tracker();

Fixture::createWebsite('2014-01-01 00:00:00');
Fixture::createWebsite('2014-01-01 00:00:00');
Expand Down

0 comments on commit c2eac03

Please sign in to comment.