Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions | Static Protected Attributes
WordsTest Class Reference
Inheritance diagram for WordsTest:

Public Member Functions

 testWords ()
 

Static Public Member Functions

static setUpBeforeClass ()
 

Static Protected Attributes

static $_wordsFinder
 

Detailed Description

Definition at line 14 of file WordsTest.php.

Member Function Documentation

◆ setUpBeforeClass()

static setUpBeforeClass ( )
static

Definition at line 21 of file WordsTest.php.

22  {
23  self::$_wordsFinder = new \Magento\TestFramework\Inspection\WordsFinder(
24  glob(__DIR__ . '/_files/words_*.xml'),
25  BP,
26  new ComponentRegistrar()
27  );
28  }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
const BP
Definition: autoload.php:14

◆ testWords()

testWords ( )
Parameters
string$file

Definition at line 30 of file WordsTest.php.

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  }

Field Documentation

◆ $_wordsFinder

$_wordsFinder
staticprotected

Definition at line 19 of file WordsTest.php.


The documentation for this class was generated from the following file: