Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/component_10.txt
This test checks the attribute management with opt:component-attributes.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:component from="$component">
<div foo="bar" opt:component-attributes="name">
Foo.
</div>
</opt:component>

>>>>data.php

$view->component = new myComponent;

>>>>expected.txt
OUTPUT

>>>>result.txt
VIEW PASSED
ATTRIBUTE MANAGEMENT FOR: div#name
foo: bar
<div foo="bar">
Foo.
</div>
Return current item: Open Power Template