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 require_once __DIR__.'/../Base.php'; use Kanboard\Model\ConfigModel; use Kanboard\..
Decoded Output download
<?php
require_once __DIR__.'/../Base.php';
use Kanboard\Model\ConfigModel;
use Kanboard\Model\TaskCreationModel;
use Kanboard\Model\ProjectModel;
use Kanboard\Subscriber\NotificationSubscriber;
class WebhookNotificationTest extends Base
{
public function testTaskCreation()
{
$configModel = new ConfigModel($this->container);
$projectModel = new ProjectModel($this->container);
$taskCreationModel = new TaskCreationModel($this->container);
$this->container['dispatcher']->addSubscriber(new NotificationSubscriber($this->container));
$configModel->save(array('webhook_url' => 'http://localhost/?task-creation'));
$this->container['httpClient']
->expects($this->once())
->method('postJson')
->with($this->stringContains('http://localhost/?task-creation&token='), $this->anything());
$this->assertEquals(1, $projectModel->create(array('name' => 'test')));
$this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test')));
}
}
?>
Did this file decode correctly?
Original Code
<?php
require_once __DIR__.'/../Base.php';
use Kanboard\Model\ConfigModel;
use Kanboard\Model\TaskCreationModel;
use Kanboard\Model\ProjectModel;
use Kanboard\Subscriber\NotificationSubscriber;
class WebhookNotificationTest extends Base
{
public function testTaskCreation()
{
$configModel = new ConfigModel($this->container);
$projectModel = new ProjectModel($this->container);
$taskCreationModel = new TaskCreationModel($this->container);
$this->container['dispatcher']->addSubscriber(new NotificationSubscriber($this->container));
$configModel->save(array('webhook_url' => 'http://localhost/?task-creation'));
$this->container['httpClient']
->expects($this->once())
->method('postJson')
->with($this->stringContains('http://localhost/?task-creation&token='), $this->anything());
$this->assertEquals(1, $projectModel->create(array('name' => 'test')));
$this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test')));
}
}
Function Calls
None |
Stats
MD5 | 8b141f99a0db808ff914b671076c3220 |
Eval Count | 0 |
Decode Time | 139 ms |