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; class CalendarHomeNotificationsT..
Decoded Output download
<?php
declare(strict_types=1);
namespace Sabre\CalDAV;
class CalendarHomeNotificationsTest extends \PHPUnit\Framework\TestCase
{
public function testGetChildrenNoSupport()
{
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
self::assertEquals(
[],
$calendarHome->getChildren()
);
}
public function testGetChildNoSupport()
{
$this->expectException('Sabre\DAV\Exception\NotFound');
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$calendarHome->getChild('notifications');
}
public function testGetChildren()
{
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$result = $calendarHome->getChildren();
self::assertEquals('notifications', $result[0]->getName());
}
public function testGetChild()
{
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$result = $calendarHome->getChild('notifications');
self::assertEquals('notifications', $result->getName());
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Sabre\CalDAV;
class CalendarHomeNotificationsTest extends \PHPUnit\Framework\TestCase
{
public function testGetChildrenNoSupport()
{
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
self::assertEquals(
[],
$calendarHome->getChildren()
);
}
public function testGetChildNoSupport()
{
$this->expectException('Sabre\DAV\Exception\NotFound');
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$calendarHome->getChild('notifications');
}
public function testGetChildren()
{
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$result = $calendarHome->getChildren();
self::assertEquals('notifications', $result[0]->getName());
}
public function testGetChild()
{
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']);
$result = $calendarHome->getChild('notifications');
self::assertEquals('notifications', $result->getName());
}
}
Function Calls
None |
Stats
MD5 | c99fa9e49bb86c7bbad81eac01e47e3c |
Eval Count | 0 |
Decode Time | 90 ms |