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 AllowedSharingModesTest extends DAV\Xml\AbstractXmlTestCase
{
public function testSimple()
{
$sccs = new AllowedSharingModes(true, true);
self::assertInstanceOf('Sabre\CalDAV\Xml\Property\AllowedSharingModes', $sccs);
}
/**
* @depends testSimple
*/
public function testSerialize()
{
$property = new AllowedSharingModes(true, true);
$this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal';
$this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs';
$xml = $this->write(['{DAV:}root' => $property]);
self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:d="DAV:" xmlns:cal="'.CalDAV\Plugin::NS_CALDAV.'" xmlns:cs="'.CalDAV\Plugin::NS_CALENDARSERVER.'">
<cs:can-be-shared/>
<cs:can-be-published/>
</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 AllowedSharingModesTest extends DAV\Xml\AbstractXmlTestCase
{
public function testSimple()
{
$sccs = new AllowedSharingModes(true, true);
self::assertInstanceOf('Sabre\CalDAV\Xml\Property\AllowedSharingModes', $sccs);
}
/**
* @depends testSimple
*/
public function testSerialize()
{
$property = new AllowedSharingModes(true, true);
$this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal';
$this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs';
$xml = $this->write(['{DAV:}root' => $property]);
self::assertXmlStringEqualsXmlString(
'<?xml version="1.0"?>
<d:root xmlns:d="DAV:" xmlns:cal="'.CalDAV\Plugin::NS_CALDAV.'" xmlns:cs="'.CalDAV\Plugin::NS_CALENDARSERVER.'">
<cs:can-be-shared/>
<cs:can-be-published/>
</d:root>
', $xml);
}
}
Function Calls
None |
Stats
MD5 | dc9d9e89ddc070fdee970eda4cbf9f37 |
Eval Count | 0 |
Decode Time | 88 ms |