🚀 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
$

📄 ZipSchemaTest.php

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

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

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

/**
 * Class ZipSchemaTest
 */
class ZipSchemaTest extends TestCase {
	/**
	 * Test it throws exception on invalid zip file.
	 *
	 * @return void
	 * @throws \Exception If the zip file is invalid.
	 */
	public function test_it_throws_exception_on_unzip_failure() {
		$this->expectException( \Exception::class );
		new ZipSchema( $this->get_fixture_path( 'invalid-zip.zip' ) );
	}

	/**
	 * Test unzipping a zip file.
	 *
	 * @return void
	 * @throws \Exception If the zip file is invalid.
	 */
	public function test_unzip() {
		$schema        = new ZipSchema( $this->get_fixture_path( 'zipped-schema.zip' ) );
		$unzipped_path = $schema->get_unzipped_path();
		$this->assertEquals( wp_upload_dir()['path'], $unzipped_path );
	}
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨