Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FunctionDetectorTest.php
Go to the documentation of this file.
1 <?php
7 
8 class FunctionDetectorTest extends \PHPUnit\Framework\TestCase
9 {
10  public function testDetectFunctions()
11  {
12  $fixturePath = __DIR__ . '/_files/test.txt';
13  $expectedResults = [
14  1 => ['strtoupper', 'strtolower'],
15  3 => ['foo'],
16  4 => ['foo'],
17  ];
18  $functionDetector = new FunctionDetector();
19  $lines = $functionDetector->detect($fixturePath, ['foo', 'strtoupper', 'test', 'strtolower']);
20  $this->assertEquals($expectedResults, $lines);
21  }
22 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60