Skip to content

Commit 339adfc

Browse files
committed
Fix wordpress database setup in benchmark tests
1 parent f38dddc commit 339adfc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/Benchmarks/Integrations/WordPressBench.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class WordPressBench extends FrameworkBenchmarksCase
1414
{
1515
/**
16-
* @BeforeMethods("enableDatadog")
16+
* @BeforeMethods({"enableDatadog", "createDatabase"})
1717
* @AfterMethods("afterMethod")
1818
* @Revs(10)
1919
* @Iterations(10)
@@ -34,12 +34,11 @@ public static function getAppIndexScript()
3434
return __DIR__ . '/../../Frameworks/WordPress/Version_6_1/index.php';
3535
}
3636

37-
public function disableWordPressTracing()
37+
public function createDatabase(): void
3838
{
3939
$pdo = new \PDO('mysql:host=mysql_integration', 'test', 'test');
4040
$pdo->exec('CREATE DATABASE IF NOT EXISTS wp61');
4141
$pdo->exec(file_get_contents(__DIR__ . '/../../Frameworks/WordPress/Version_6_1/scripts/wp_initdb.sql'));
42-
$this->disableDatadog();
4342
}
4443

4544
public function afterMethod()
@@ -48,7 +47,7 @@ public function afterMethod()
4847
}
4948

5049
/**
51-
* @BeforeMethods("disableWordPressTracing")
50+
* @BeforeMethods({"disableDatadog", "createDatabase"})
5251
* @AfterMethods("afterMethod")
5352
* @Revs(10)
5453
* @Iterations(10)

0 commit comments

Comments
 (0)