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\CalDAV\Xml\Property; use Sabre\CalDAV; u..

Decoded Output download

<?php

declare(strict_types=1);

namespace Sabre\CalDAV\Xml\Property;

use Sabre\CalDAV;
use Sabre\DAV;

class SupportedCollationSetTest extends DAV\Xml\AbstractXmlTestCase
{
    public function testSimple()
    {
        $scs = new SupportedCollationSet();
        self::assertInstanceOf('Sabre\CalDAV\Xml\Property\SupportedCollationSet', $scs);
    }

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

        $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal';
        $xml = $this->write(['{DAV:}root' => $property]);

        self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:d="DAV:" xmlns:cal="'.CalDAV\Plugin::NS_CALDAV.'">
<cal:supported-collation>i;ascii-casemap</cal:supported-collation>
<cal:supported-collation>i;octet</cal:supported-collation>
<cal:supported-collation>i;unicode-casemap</cal:supported-collation>
</d:root>', $xml);
    }
}

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Sabre\CalDAV\Xml\Property;

use Sabre\CalDAV;
use Sabre\DAV;

class SupportedCollationSetTest extends DAV\Xml\AbstractXmlTestCase
{
    public function testSimple()
    {
        $scs = new SupportedCollationSet();
        self::assertInstanceOf('Sabre\CalDAV\Xml\Property\SupportedCollationSet', $scs);
    }

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

        $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal';
        $xml = $this->write(['{DAV:}root' => $property]);

        self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:d="DAV:" xmlns:cal="'.CalDAV\Plugin::NS_CALDAV.'">
<cal:supported-collation>i;ascii-casemap</cal:supported-collation>
<cal:supported-collation>i;octet</cal:supported-collation>
<cal:supported-collation>i;unicode-casemap</cal:supported-collation>
</d:root>', $xml);
    }
}

Function Calls

None

Variables

None

Stats

MD5 80461e620172bedbf5aabb0d0e2b0ab7
Eval Count 0
Decode Time 77 ms