🚀 Hostinger Optimized
🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl

💻 Terminal

📁 /home/stakrfrcol/agency
$

📄 JsonSchemaTest.php

📁 Path: ./wp-content/plugins/woocommerce/vendor/woocommerce/blueprint/tests/Unit/Schemas/JsonSchemaTest.php
📊 Size: 1.2 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

namespace Automattic\WooCommerce\Blueprint\Tests\Unit\Schemas;

use Automattic\WooCommerce\Blueprint\Schemas\JsonSchema;
use Automattic\WooCommerce\Blueprint\Tests\TestCase;

/**
 * Class JsonSchemaTest
 */
class JsonSchemaTest extends TestCase {
	/**
	 * Test getting steps from a schema.
	 *
	 * @return void
	 */
	public function test_get_steps() {
		$schema = new JsonSchema( $this->get_fixture_path( 'empty-steps.json' ) );
		$steps  = $schema->get_steps();
		$this->assertIsArray( $steps );
		$this->assertCount( 0, $steps );
	}

	/**
	 * Test getting a step from a schema.
	 *
	 * @return void
	 */
	public function test_get_step() {
		$name   = 'installPlugin';
		$schema = new JsonSchema( $this->get_fixture_path( 'with-install-plugin-step.json' ) );
		$steps  = $schema->get_step( $name );
		$this->assertIsArray( $steps );
		foreach ( $steps as $step ) {
			$this->assertEquals( $name, $step->step );
		}
	}

	/**
	 * Test getting a step from a schema that does not exist.
	 *
	 * @return void
	 */
	public function test_it_throws_invalid_argument_exception_with_invalid_json() {
		$this->expectException( \InvalidArgumentException::class );
		new JsonSchema( $this->get_fixture_path( 'invalid-json.json' ) );
	}
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨