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\Model\Product;

use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Validator;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\DataObject;
use PHPUnit\Framework\TestCase;

class ValidatorTest extends TestCase
{
    public function testValidator()
    {
        $validator = new Validator();
        $productMock = $this->createMock(Product::class);
        $requestMock = $this->getMockForAbstractClass(RequestInterface::class);
        $responseMock = $this->createMock(DataObject::class);
        $productMock->expects($this->once())->method('validate')->willReturn(true);
        $this->assertTrue($validator->validate($productMock, $requestMock, $responseMock));
    }
}
 ?>

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\Model\Product;

use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Validator;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\DataObject;
use PHPUnit\Framework\TestCase;

class ValidatorTest extends TestCase
{
    public function testValidator()
    {
        $validator = new Validator();
        $productMock = $this->createMock(Product::class);
        $requestMock = $this->getMockForAbstractClass(RequestInterface::class);
        $responseMock = $this->createMock(DataObject::class);
        $productMock->expects($this->once())->method('validate')->willReturn(true);
        $this->assertTrue($validator->validate($productMock, $requestMock, $responseMock));
    }
}

Function Calls

None

Variables

None

Stats

MD5 ef238b5d75d39d4df5a8ea7a73d24bd6
Eval Count 0
Decode Time 107 ms