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 ); } }