public function testEncodeScalarWithAttribute() {
$array = array(
'person' => array(
'@gender' => 'M',
'#' => 'Peter',
),
);
$expected = '<?xml version="1.0"?>' . "\n" . '<response><person gender="M">Peter</person></response>' . "\n";
$this
->assertEquals($expected, $this->encoder
->encode($array, 'xml'));
}