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); /** * Passbolt ~ Open source password manager for teams ..
Decoded Output download
<?php
declare(strict_types=1);
/**
* Passbolt ~ Open source password manager for teams
* Copyright (c) Passbolt SA (https://www.passbolt.com)
*
* Licensed under GNU Affero General Public License version 3 of the or any later version.
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.0.0
*/
namespace App\Test\TestCase\Controller\Notifications;
use App\Notification\Email\Redactor\User\AdminDeleteEmailRedactor;
use App\Test\Lib\AppIntegrationTestCase;
use App\Test\Lib\Model\EmailQueueTrait;
use App\Utility\UuidFactory;
use Cake\Core\Configure;
class UsersDeleteNotificationTest extends AppIntegrationTestCase
{
use EmailQueueTrait;
public $fixtures = [
'app.Base/Users', 'app.Base/Groups', 'app.Base/Profiles', 'app.Base/Gpgkeys', 'app.Base/Roles',
'app.Base/Resources', 'app.Base/Favorites', 'app.Base/Secrets',
'app.Base/GroupsUsers', 'app.Base/Permissions',
];
public function testUsersDeleteNotificationSuccess(): void
{
$francesId = UuidFactory::uuid('user.id.ursula');
Configure::write(AdminDeleteEmailRedactor::CONFIG_KEY_EMAIL_ENABLED, false);
$this->authenticateAs('admin');
$this->deleteJson('/users/' . $francesId . '.json');
$this->assertSuccess();
$this->assertEmailInBatchContains('deleted the user Ursula', '[email protected]');
$this->assertEmailInBatchContains('Human resource', '[email protected]');
$this->assertEmailInBatchContains('IT support', '[email protected]');
$this->assertEmailInBatchContains('deleted the user Ursula', '[email protected]');
$this->assertEmailInBatchContains('Human resource', '[email protected]');
$this->assertEmailInBatchNotContains('IT support', '[email protected]');
$this->assertEmailWithRecipientIsInNotQueue('[email protected]');
// Two mails should be in the queue
$this->assertEmailQueueCount(2);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/**
* Passbolt ~ Open source password manager for teams
* Copyright (c) Passbolt SA (https://www.passbolt.com)
*
* Licensed under GNU Affero General Public License version 3 of the or any later version.
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
* @link https://www.passbolt.com Passbolt(tm)
* @since 2.0.0
*/
namespace App\Test\TestCase\Controller\Notifications;
use App\Notification\Email\Redactor\User\AdminDeleteEmailRedactor;
use App\Test\Lib\AppIntegrationTestCase;
use App\Test\Lib\Model\EmailQueueTrait;
use App\Utility\UuidFactory;
use Cake\Core\Configure;
class UsersDeleteNotificationTest extends AppIntegrationTestCase
{
use EmailQueueTrait;
public $fixtures = [
'app.Base/Users', 'app.Base/Groups', 'app.Base/Profiles', 'app.Base/Gpgkeys', 'app.Base/Roles',
'app.Base/Resources', 'app.Base/Favorites', 'app.Base/Secrets',
'app.Base/GroupsUsers', 'app.Base/Permissions',
];
public function testUsersDeleteNotificationSuccess(): void
{
$francesId = UuidFactory::uuid('user.id.ursula');
Configure::write(AdminDeleteEmailRedactor::CONFIG_KEY_EMAIL_ENABLED, false);
$this->authenticateAs('admin');
$this->deleteJson('/users/' . $francesId . '.json');
$this->assertSuccess();
$this->assertEmailInBatchContains('deleted the user Ursula', '[email protected]');
$this->assertEmailInBatchContains('Human resource', '[email protected]');
$this->assertEmailInBatchContains('IT support', '[email protected]');
$this->assertEmailInBatchContains('deleted the user Ursula', '[email protected]');
$this->assertEmailInBatchContains('Human resource', '[email protected]');
$this->assertEmailInBatchNotContains('IT support', '[email protected]');
$this->assertEmailWithRecipientIsInNotQueue('[email protected]');
// Two mails should be in the queue
$this->assertEmailQueueCount(2);
}
}
Function Calls
None |
Stats
MD5 | ee82b38b812a9d4e29efcc48ecaf957a |
Eval Count | 0 |
Decode Time | 71 ms |