public function ContainsLogicFilterTest::testSwitchIsLogic in Drupal 7 to 8/9 Module Upgrader 8
File
- tests/
src/ Unit/ Utility/ Filter/ ContainsLogicFilterTest.php, line 36
Class
- ContainsLogicFilterTest
- @group DMU.Utility.Filter
Namespace
Drupal\Tests\drupalmoduleupgrader\Unit\Utility\FilterCode
public function testSwitchIsLogic() {
$function = <<<'END'
function foo() {
switch ($baz) {
case 'a':
case 'b':
default:
break;
}
}
END;
$this
->assertTrue(Parser::parseSnippet($function)
->is($this->filter));
}