![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/Profiler/Test/Unit/Driver/Standard/Output/ |
<?php declare(strict_types=1); /** * Test class for \Magento\Framework\Profiler\Driver\Standard\Output\Csvfile * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\Profiler\Test\Unit\Driver\Standard\Output; use Magento\Framework\Profiler\Driver\Standard\Output\Csvfile; use PHPUnit\Framework\TestCase; class CsvfileTest extends TestCase { /** * @dataProvider constructorProvider * @param array $config * @param string $expectedFilePath * @param string $expectedDelimiter * @param string $expectedEnclosure */ public function testConstructor($config, $expectedFilePath, $expectedDelimiter, $expectedEnclosure) { $this->markTestSkipped('Skipped in #27500 due to testing protected/private methods and properties'); $output = new Csvfile($config); $this->assertAttributeEquals($expectedFilePath, '_filePath', $output); $this->assertAttributeEquals($expectedDelimiter, '_delimiter', $output); $this->assertAttributeEquals($expectedEnclosure, '_enclosure', $output); } /** * @return array */ public function constructorProvider() { return [ 'Default config' => [ 'config' => [], 'filePath' => '/var/log/profiler.csv', 'delimiter' => ',', 'enclosure' => '"', ], 'Custom config' => [ 'config' => [ 'baseDir' => '/var/www/project/', 'filePath' => '/log/example.csv', 'delimiter' => "\t", 'enclosure' => '"', ], 'filePath' => '/var/www/project/log/example.csv', 'delimiter' => "\t", 'enclosure' => '"', ] ]; } }