You are here

public function OutputRulesTest::testEnc in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php \Masterminds\HTML5\Tests\Serializer\OutputRulesTest::testEnc()

Test basic encoding of text. @dataProvider getEncData

File

vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php, line 429

Class

OutputRulesTest

Namespace

Masterminds\HTML5\Tests\Serializer

Code

public function testEnc($isAttribute, $test, $expected, $expectedEncoded) {
  list($o, $s) = $this
    ->getOutputRules();
  $m = $this
    ->getProtectedMethod('enc');
  $this
    ->assertEquals($expected, $m
    ->invoke($o, $test, $isAttribute));
  list($o, $s) = $this
    ->getOutputRules(array(
    'encode_entities' => true,
  ));
  $m = $this
    ->getProtectedMethod('enc');
  $this
    ->assertEquals($expectedEncoded, $m
    ->invoke($o, $test, $isAttribute));
}