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 Automattic\WooCommerce\RemoteSpecsValidation\Tests; use Automattic\WooCo..

Decoded Output download

<?php

namespace Automattic\WooCommerce\RemoteSpecsValidation\Tests;

use Automattic\WooCommerce\RemoteSpecsValidation\RemoteSpecValidator;

class RemoteSpecValidatorTest extends TestCase {
	public function test_it_throws_invalid_argument_exception_with_invalid_bundle() {
		$this->expectException( \InvalidArgumentException::class );
		RemoteSpecValidator::create_from_bundle( 'invalid-bundle' );
	}

	public function test_it_returns_formatted_errors() {
	    $validator = RemoteSpecValidator::create_from_bundle( 'remote-inbox-notification' );
		$result = $validator->validate( '{}' );
		$errors = $result->get_errors();
		$this->assertIsArray( $errors );
		$this->assertEquals( '/', array_keys( $errors )[0] );
	}
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Automattic\WooCommerce\RemoteSpecsValidation\Tests;

use Automattic\WooCommerce\RemoteSpecsValidation\RemoteSpecValidator;

class RemoteSpecValidatorTest extends TestCase {
	public function test_it_throws_invalid_argument_exception_with_invalid_bundle() {
		$this->expectException( \InvalidArgumentException::class );
		RemoteSpecValidator::create_from_bundle( 'invalid-bundle' );
	}

	public function test_it_returns_formatted_errors() {
	    $validator = RemoteSpecValidator::create_from_bundle( 'remote-inbox-notification' );
		$result = $validator->validate( '{}' );
		$errors = $result->get_errors();
		$this->assertIsArray( $errors );
		$this->assertEquals( '/', array_keys( $errors )[0] );
	}
}

Function Calls

None

Variables

None

Stats

MD5 6c884e238669f0e5ae757feebcfcebd9
Eval Count 0
Decode Time 135 ms