xref: /PHP-8.0/ext/phar/tests/bug79503.phpt (revision ccca2c44)
1--TEST--
2Bug #79503 (Memory leak on duplicate metadata)
3--SKIPIF--
4<?php
5if (!extension_loaded('phar')) die('skip phar extension not available');
6?>
7--FILE--
8<?php
9try {
10    new Phar(__DIR__ . '/bug79503.phar');
11} catch (UnexpectedValueException $ex) {
12    echo $ex->getMessage();
13}
14?>
15--EXPECTF--
16phar error: tar-based phar "%s%ebug79503.phar" has invalid metadata in magic file ".phar/.metadata.bin"
17