Definition at line 10 of file ProfilerTest.php.
◆ applyConfigDataProvider()
applyConfigDataProvider |
( |
| ) |
|
- Returns
- array
Definition at line 31 of file ProfilerTest.php.
34 'Empty config does not create any driver' => [
'config' => [],
'drivers' => []],
35 'Integer 0 does not create any driver' => [
36 'config' => [
'drivers' => [0]],
39 'Integer 1 does creates standard driver' => [
40 'config' => [
'drivers' => [1]],
41 'drivers' => [new \Magento\Framework\Profiler\Driver\Standard()],
43 'Config array key sets driver type' => [
44 'configs' => [
'drivers' => [
'standard' => 1]],
45 'drivers' => [new \Magento\Framework\Profiler\Driver\Standard()],
47 'Config array key ignored when type set' => [
48 'config' => [
'drivers' => [
'custom' => [
'type' =>
'standard']]],
49 'drivers' => [new \Magento\Framework\Profiler\Driver\Standard()],
51 'Config with outputs element as integer 1 creates output' => [
53 'drivers' => [[
'outputs' => [
'html' => 1]]],
54 'baseDir' =>
'/some/base/dir',
57 new \Magento\Framework\Profiler\Driver\Standard(
58 [
'outputs' => [[
'type' =>
'html',
'baseDir' =>
'/some/base/dir']]]
62 'Config with outputs element as integer 0 does not create output' => [
63 'config' => [
'drivers' => [[
'outputs' => [
'html' => 0]]]],
64 'drivers' => [new \Magento\Framework\Profiler\Driver\Standard()],
66 'Config with shortly defined outputs element' => [
67 'config' => [
'drivers' => [[
'outputs' => [
'foo' =>
'html']]]],
69 new \Magento\Framework\Profiler\Driver\Standard([
'outputs' => [[
'type' =>
'html']]]),
72 'Config with fully defined outputs element options' => [
79 'filterName' =>
'/someFilter/',
80 'thresholds' => [
'someKey' => 123],
81 'baseDir' =>
'/custom/dir',
88 new \Magento\Framework\Profiler\Driver\Standard(
93 'filterName' =>
'/someFilter/',
94 'thresholds' => [
'someKey' => 123],
95 'baseDir' =>
'/custom/dir',
102 'Config with shortly defined output' => [
103 'config' => [
'drivers' => [[
'output' =>
'html']]],
105 new \Magento\Framework\Profiler\Driver\Standard([
'outputs' => [[
'type' =>
'html']]]),
◆ tearDown()
◆ testApplyConfigWithDrivers()
testApplyConfigWithDrivers |
( |
array |
$config, |
|
|
array |
$expectedDrivers |
|
) |
| |
@dataProvider applyConfigDataProvider
- Parameters
-
array | $config | |
array | $expectedDrivers | |
Definition at line 22 of file ProfilerTest.php.
25 $this->assertAttributeEquals($expectedDrivers,
'_drivers', \
Magento\Framework\Profiler::class);
static applyConfig($config, $baseDir, $isAjax=false)
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php