Elgg\lib\output\FormatAttributesTest::testGeneralUsage PHP Method

testGeneralUsage() public method

public testGeneralUsage ( )
    public function testGeneralUsage()
    {
        $attrs = ['A' => 'Hello & &amp; < &lt;', 'b' => false, 'c' => true, 'd' => null, 'e' => ['&', '&amp;', '<', '&lt;'], 'f' => (object) ['foo' => 'bar'], 'g' => ['bar', true, 1.5, 2], 'h' => ['foo', []], 'i' => [new \ElggObject()]];
        $expected = 'a="Hello &amp; &amp; &lt; &lt;" c="c" e="&amp; &amp; &lt; &lt;" g="bar 1 1.5 2"';
        $this->assertEquals($expected, elgg_format_attributes($attrs));
    }