Doctrine\Tests\OXM\Marshaller\NamespacesTest::itShouldWriteNamespacesCorrectly PHP Метод

itShouldWriteNamespacesCorrectly() публичный Метод

    public function itShouldWriteNamespacesCorrectly()
    {
        $request = new Foo();
        $request->id = 1;
        $request->bo = "bar";
        $xml = $this->marshaller->marshalToString($request);
        $this->assertXmlStringEqualsXmlString('<foo xmlns="http://www.foobar.com/schema" xmlns:baz="http://www.foobaz.com/schema">
            <id>1</id>
                <baz:bo>bar</baz:bo>
            </foo>', $xml);
        $otherRequest = $this->marshaller->unmarshalFromString($xml);
        $this->assertEquals(1, $otherRequest->id);
        $this->assertEquals("bar", $otherRequest->bo);
    }