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 namespace Roundcube\Tests\Browser\Contacts; use Roundcube\Tests\Browser\Bootstrap;..
Decoded Output download
<?php
namespace Roundcube\Tests\Browser\Contacts;
use Roundcube\Tests\Browser\Bootstrap;
use Roundcube\Tests\Browser\Components\App;
use Roundcube\Tests\Browser\TestCase;
class PrintTest extends TestCase
{
#[\Override]
public static function setUpBeforeClass(): void
{
Bootstrap::init_db();
}
/**
* Test Print action
*/
public function testPrint()
{
$this->browse(function ($browser) {
$browser->go('addressbook');
$browser->waitFor('#contacts-table tbody tr:first-child')
->ctrlClick('#contacts-table tbody tr:first-child');
[$current_window, $new_window] = $browser->openWindow(function ($browser) {
if ($browser->isPhone()) {
$this->markTestSkipped();
}
$browser->clickToolbarMenuItem('print');
});
$browser->driver->switchTo()->window($new_window);
$browser->with(new App(), static function ($browser) {
$browser->assertEnv([
'task' => 'addressbook',
'action' => 'print',
]);
});
$browser->assertVisible('#contactphoto img')
->assertSeeIn('#contacthead .firstname', 'John')
->assertSeeIn('#contacthead .surname', 'Doe')
->assertSeeIn('#contacttabs fieldset:first-child legend', 'Properties')
->assertSeeIn('#contacttabs', '[email protected]');
$browser->driver->close();
$browser->driver->switchTo()->window($current_window);
});
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Roundcube\Tests\Browser\Contacts;
use Roundcube\Tests\Browser\Bootstrap;
use Roundcube\Tests\Browser\Components\App;
use Roundcube\Tests\Browser\TestCase;
class PrintTest extends TestCase
{
#[\Override]
public static function setUpBeforeClass(): void
{
Bootstrap::init_db();
}
/**
* Test Print action
*/
public function testPrint()
{
$this->browse(function ($browser) {
$browser->go('addressbook');
$browser->waitFor('#contacts-table tbody tr:first-child')
->ctrlClick('#contacts-table tbody tr:first-child');
[$current_window, $new_window] = $browser->openWindow(function ($browser) {
if ($browser->isPhone()) {
$this->markTestSkipped();
}
$browser->clickToolbarMenuItem('print');
});
$browser->driver->switchTo()->window($new_window);
$browser->with(new App(), static function ($browser) {
$browser->assertEnv([
'task' => 'addressbook',
'action' => 'print',
]);
});
$browser->assertVisible('#contactphoto img')
->assertSeeIn('#contacthead .firstname', 'John')
->assertSeeIn('#contacthead .surname', 'Doe')
->assertSeeIn('#contacttabs fieldset:first-child legend', 'Properties')
->assertSeeIn('#contacttabs', '[email protected]');
$browser->driver->close();
$browser->driver->switchTo()->window($current_window);
});
}
}
Function Calls
None |
Stats
MD5 | 0b6f78afd15512d33743c6062e1dfcfd |
Eval Count | 0 |
Decode Time | 84 ms |