Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WordsTest.php
Go to the documentation of this file.
1 <?php
10 namespace Magento\Test\Legacy;
11 
13 
14 class WordsTest extends \PHPUnit\Framework\TestCase
15 {
19  protected static $_wordsFinder;
20 
21  public static function setUpBeforeClass()
22  {
23  self::$_wordsFinder = new \Magento\TestFramework\Inspection\WordsFinder(
24  glob(__DIR__ . '/_files/words_*.xml'),
25  BP,
26  new ComponentRegistrar()
27  );
28  }
29 
30  public function testWords()
31  {
32  $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
33  $invoker(
37  function ($file) {
38  $words = self::$_wordsFinder->findWords(realpath($file));
39  if ($words) {
40  $this->fail("Found words: '" . implode("', '", $words) . "' in '{$file}' file");
41  }
42  },
44  );
45  }
46 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
const BP
Definition: autoload.php:14