Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SplitWordsTest.php
Go to the documentation of this file.
1 <?php
7 
8 class SplitWordsTest extends \PHPUnit\Framework\TestCase
9 {
13  public function testSplitWords()
14  {
15  $words = '123 123 45 789';
16  $filter = new \Magento\Framework\Filter\SplitWords(false, 3);
17  $this->assertEquals(['123', '123', '45'], $filter->filter($words));
18  $filter = new \Magento\Framework\Filter\SplitWords(true, 2);
19  $this->assertEquals(['123', '45'], $filter->filter($words));
20  }
21 }