Skip to content

Commit fd190aa

Browse files
committed
Generate test script
1 parent 8a90459 commit fd190aa

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ext/opcache/tests/optional_interfaces.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ server
1212

1313
$interfaceFile = __DIR__.'/optional_interfaces_interface.inc';
1414

15+
file_put_contents(__DIR__.'/optional_interfaces_script.php', <<<SCRIPT
16+
<?php
17+
18+
@(include __DIR__.'/optional_interfaces_interface.inc');
19+
20+
if (interface_exists('OpcachedInterface'))
21+
echo "OpcachedInterface is defined\n";
22+
else
23+
echo "OpcachedInterface is not defined\n";
24+
25+
include __DIR__.'/optional_interfaces_class.inc';
26+
27+
echo "OpcachedClass implements:".implode(', ', class_implements('OpcachedClass'))."\n\n";
28+
SCRIPT);
29+
1530
include __DIR__.'/php_cli_server.inc';
1631
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1');
1732

@@ -27,6 +42,8 @@ unlink($interfaceFile);
2742

2843
echo file_get_contents($uri);
2944

45+
unlink(__DIR__.'/optional_interfaces_script.php');
46+
3047
?>
3148
--EXPECT--
3249
OpcachedInterface is not defined

0 commit comments

Comments
 (0)