Commit:    d7844d2a8f7c15ac0312e1a8909a47e83778c48a
Author:    Peter Kokot <peterko...@gmail.com>         Sat, 6 Oct 2018 20:40:17 
+0200
Committer: Christoph M. Becker <cmbecke...@gmx.de>      Fri, 12 Oct 2018 
21:51:51 +0200
Parents:   0889113944c58a53b82aecf4332b2fc79ec58d46
Branches:  master

Link:       
http://git.php.net/?p=web/qa.git;a=commitdiff;h=d7844d2a8f7c15ac0312e1a8909a47e83778c48a

Log:
Add --EXTENSIONS-- section

Changed paths:
  M  phpt_details.php
  A  sample_tests/extensions.php


Diff:
diff --git a/phpt_details.php b/phpt_details.php
index 9a760e4..ce1b1e3 100644
--- a/phpt_details.php
+++ b/phpt_details.php
@@ -21,6 +21,7 @@ common_header();
 [<a href="#credits_section">--CREDITS--</a>]<br/>
 [<a href="#skipif_section">--SKIPIF--</a>]<br/>
 [<a href="#capture_stdio_section">--CAPTURE_STDIO--</a>]<br/>
+[<a href="#extensions_section">--EXTENSIONS--</a>]<br/>
 [<a href="#post_section">--POST--</a> | <a href="#put_section">--PUT--</a> | 
<a href="#post_raw_section">--POST_RAW--</a> | <a 
href="#gzip_post_section">--GZIP_POST--</a> | <a 
href="#deflate_post_section">--DEFLATE_POST--</a> | <a 
href="#get_section">--GET--</a>]<br/>
 [<a href="#cookie_section">--COOKIE--</a>]<br/>
 [<a href="#stdin_section">--STDIN--</a>]<br/>
@@ -156,6 +157,27 @@ STDIN STDOUT</pre>
 STDIN STDOUT STDERR</pre>
 </p>
 <p><b>Example 3(full):</b> <a 
href="sample_tests/capture_stdio_3.php">capture_stdio_3.phpt</a></p>
+
+<dt id="extensions_section">--EXTENSIONS--</dt>
+<dd>
+<p><b>Description:</b><br/>
+Additional required shared extensions to be loaded when running the test. When
+the run-tests.php script is executed it loads all the extensions that are
+available and enabled for that particular PHP at the time. If the test requires
+additional extension to be loaded and they aren't loaded prior to running the
+test, this section loads them.</p>
+<p><b>Required:</b><br/>
+No.</p>
+<p><b>Format:</b><br/>
+A case sensitive newline separated list of extension names.</p>
+<p><b>Example 1 (snippet):</b><br/>
+<pre>--EXTENSIONS--
+curl
+imagick
+tokenizer
+</pre>
+</p>
+<p><b>Example 1 (full):</b> <a 
href="sample_tests/extensions.php">extensions.phpt</a></p>
 </dd>
 
 <dt id="post_section">--POST--</dt>
diff --git a/sample_tests/extensions.php b/sample_tests/extensions.php
new file mode 100644
index 0000000..5ab583f
--- /dev/null
+++ b/sample_tests/extensions.php
@@ -0,0 +1,40 @@
+<?php
+include("../include/functions.php");
+
+$TITLE = "Sample Test [PHP-QAT: Quality Assurance Team]";
+$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
+
+common_header();
+?>
+
+<div style="padding: 10px">
+<h1>Sample Test: extensions.phpt</h1>
+<p>Back to &quot;<a href="../phpt_details.php">PHPT Test File 
Layout</a>&quot;</p>
+
+<pre>--TEST--
+phpt EXTENSIONS directive with shared extensions
+--DESCRIPTION--
+This test covers the presence of some loaded extensions with a list of 
additional
+extensions to be loaded when running test.
+--EXTENSIONS--
+curl
+imagick
+tokenizer
+--FILE--
+&lt;?php
+var_dump(extension_loaded(&apos;curl&apos;));
+var_dump(extension_loaded(&apos;imagick&apos;));
+var_dump(extension_loaded(&apos;tokenizer&apos;));
+?&gt;
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+</pre>
+
+<p>Back to &quot;<a href="../phpt_details.php">PHPT Test File 
Layout</a>&quot;</p>
+</div>
+
+<?php
+common_footer();
+?>

Reply via email to