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 /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..
Decoded Output download
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Attribute\Button;
use Magento\Catalog\Block\Adminhtml\Product\Attribute\Button\Save;
class SaveTest extends GenericTest
{
/**
* {@inheritdoc}
*/
protected function getModel()
{
return $this->objectManager->getObject(Save::class, [
'context' => $this->contextMock,
'registry' => $this->registryMock,
]);
}
public function testGetButtonData()
{
$this->assertEquals(
[
'label' => __('Save Attribute'),
'class' => 'save primary',
'data_attribute' => [
'mage-init' => ['button' => ['event' => 'save']],
'form-role' => 'save',
]
],
$this->getModel()->getButtonData()
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Attribute\Button;
use Magento\Catalog\Block\Adminhtml\Product\Attribute\Button\Save;
class SaveTest extends GenericTest
{
/**
* {@inheritdoc}
*/
protected function getModel()
{
return $this->objectManager->getObject(Save::class, [
'context' => $this->contextMock,
'registry' => $this->registryMock,
]);
}
public function testGetButtonData()
{
$this->assertEquals(
[
'label' => __('Save Attribute'),
'class' => 'save primary',
'data_attribute' => [
'mage-init' => ['button' => ['event' => 'save']],
'form-role' => 'save',
]
],
$this->getModel()->getButtonData()
);
}
}
Function Calls
| None |
Stats
| MD5 | aa3cbdeb6674140f2fc00fea3f5ad85c |
| Eval Count | 0 |
| Decode Time | 95 ms |