Sha256: d0069241afd44ed925a71dc401c0ea8b5f3115d486f86f36dc58f1f28867db11

Contents?: true

Size: 1.31 KB

Versions: 10

Compression:

Stored size: 1.31 KB

Contents

--FILE--
<?php
$env = new MtHaml\Environment('php', array('enable_escaper' => false));
echo $env->compileString($parts['HAML'], "$file.haml");

--HAML--
%html{html_attrs()}
%html{html_attrs(1, 2, 3)}
%html{html_attrs(1, 2, 3, array("foo" => "bar"))}
%html{html_attrs(1, 2, 3, array("foo" => "bar")), $foo}
%p{$list}
%p{$list, :foo => "bar"}
--EXPECT--
<html <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create((html_attrs()))), 'html5', 'UTF-8', false); ?>></html>
<html <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create((html_attrs(1, 2, 3)))), 'html5', 'UTF-8', false); ?>></html>
<html <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create((html_attrs(1, 2, 3, array("foo" => "bar"))))), 'html5', 'UTF-8', false); ?>></html>
<html <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create((html_attrs(1, 2, 3, array("foo" => "bar")))), MtHaml\Runtime\AttributeList::create($foo)), 'html5', 'UTF-8', false); ?>></html>
<p <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create($list)), 'html5', 'UTF-8', false); ?>></p>
<p <?php echo MtHaml\Runtime::renderAttributes(array(MtHaml\Runtime\AttributeList::create($list), array('foo', 'bar')), 'html5', 'UTF-8', false); ?>></p>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
guard-mthaml-0.4.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.3.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.3.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.5 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.4 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.3 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.2 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.2.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test
guard-mthaml-0.1.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test