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\DAVACL\FS; class FileTest extends \PHPUn..
Decoded Output download
<?php
declare(strict_types=1);
namespace Sabre\DAVACL\FS;
class FileTest extends \PHPUnit\Framework\TestCase
{
/**
* System under test.
*
* @var File
*/
protected $sut;
protected $path = 'foo';
protected $acl = [
[
'privilege' => '{DAV:}read',
'principal' => '{DAV:}authenticated',
],
];
protected $owner = 'principals/evert';
public function setup(): void
{
$this->sut = new File($this->path, $this->acl, $this->owner);
}
public function testGetOwner()
{
self::assertEquals(
$this->owner,
$this->sut->getOwner()
);
}
public function testGetGroup()
{
self::assertNull(
$this->sut->getGroup()
);
}
public function testGetACL()
{
self::assertEquals(
$this->acl,
$this->sut->getACL()
);
}
public function testSetAcl()
{
$this->expectException('Sabre\DAV\Exception\Forbidden');
$this->sut->setACL([]);
}
public function testGetSupportedPrivilegeSet()
{
self::assertNull(
$this->sut->getSupportedPrivilegeSet()
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Sabre\DAVACL\FS;
class FileTest extends \PHPUnit\Framework\TestCase
{
/**
* System under test.
*
* @var File
*/
protected $sut;
protected $path = 'foo';
protected $acl = [
[
'privilege' => '{DAV:}read',
'principal' => '{DAV:}authenticated',
],
];
protected $owner = 'principals/evert';
public function setup(): void
{
$this->sut = new File($this->path, $this->acl, $this->owner);
}
public function testGetOwner()
{
self::assertEquals(
$this->owner,
$this->sut->getOwner()
);
}
public function testGetGroup()
{
self::assertNull(
$this->sut->getGroup()
);
}
public function testGetACL()
{
self::assertEquals(
$this->acl,
$this->sut->getACL()
);
}
public function testSetAcl()
{
$this->expectException('Sabre\DAV\Exception\Forbidden');
$this->sut->setACL([]);
}
public function testGetSupportedPrivilegeSet()
{
self::assertNull(
$this->sut->getSupportedPrivilegeSet()
);
}
}
Function Calls
None |
Stats
MD5 | dedb476f72b2021fae48650327eb2603 |
Eval Count | 0 |
Decode Time | 121 ms |