Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace Sabre\CardDAV\Xml\Property; use Sabre\CardDAV;..

Decoded Output download

<?php

declare(strict_types=1);

namespace Sabre\CardDAV\Xml\Property;

use Sabre\CardDAV;
use Sabre\DAV;

class SupportedAddressDataTest extends DAV\Xml\AbstractXmlTestCase
{
    public function testSimple()
    {
        $property = new SupportedAddressData();
        self::assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedAddressData', $property);
    }

    /**
     * @depends testSimple
     */
    public function testSerialize()
    {
        $property = new SupportedAddressData();

        $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card';
        $xml = $this->write(['{DAV:}root' => $property]);

        self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:card="'.CardDAV\Plugin::NS_CARDDAV.'" xmlns:d="DAV:">'.
'<card:address-data-type content-type="text/vcard" version="3.0"/>'.
'<card:address-data-type content-type="text/vcard" version="4.0"/>'.
'<card:address-data-type content-type="application/vcard+json" version="4.0"/>'.
'</d:root>
', $xml);
    }
}

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Sabre\CardDAV\Xml\Property;

use Sabre\CardDAV;
use Sabre\DAV;

class SupportedAddressDataTest extends DAV\Xml\AbstractXmlTestCase
{
    public function testSimple()
    {
        $property = new SupportedAddressData();
        self::assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedAddressData', $property);
    }

    /**
     * @depends testSimple
     */
    public function testSerialize()
    {
        $property = new SupportedAddressData();

        $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card';
        $xml = $this->write(['{DAV:}root' => $property]);

        self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:card="'.CardDAV\Plugin::NS_CARDDAV.'" xmlns:d="DAV:">'.
'<card:address-data-type content-type="text/vcard" version="3.0"/>'.
'<card:address-data-type content-type="text/vcard" version="4.0"/>'.
'<card:address-data-type content-type="application/vcard+json" version="4.0"/>'.
'</d:root>
', $xml);
    }
}

Function Calls

None

Variables

None

Stats

MD5 dd1554f99fa444d32ce9c71e89cdee49
Eval Count 0
Decode Time 110 ms