| 1883 | Â | <title>Global test cases</title>Â |
| 1884 | Â | <para>Â |
| 1885 |  | Global test case scripts can be created using the <literal><test></literal> tag. |
| 1886 | Â | The <literal><test></literal> has a single attribute <literal>name</literal>. Â |
| 1887 | Â | As the test name is used as the test file basename <literal>name</literal>Â |
| 1888 |  | has to be unique and only characters, digits and <literal>'-'</literal> and |
| 1889 |  | <literal>'_'</literal> are allowed in test names. A more readable test |
| 1890 |  | title may be set using the <literal><title></literal> tag within  |
| 1891 |  | <literal><test></literal>. |
| 1892 | Â | </para>Â |
| 1893 | Â | <para>Â |
| 1894 | Â | The actual PHP code to run is specified using a <literal><code></literal>Â |
| 1895 | Â | section. The expected output is specified using a <literal><result></literal>Â |
| 1896 |  | tag, it defaults to <literal>OK</literal>. The PHP test suite supports three |
| 1897 |  | different ways to compare test output with the expected result: plain string |
| 1898 |  | comparison, comparison using printf style placeholders like %d for numbers |
| 1899 | Â | and regular expresions (for details see the <filename>README.TESTING*</filename>Â |
| 1900 |  | files in the PHP source). By default the <literal>plain</literal> mode is used, |
| 1901 | Â | the other two modes can be selected by setting the <literal>mode</literal>Â |
| 1902 |  | attribute of <literal><result></literal> to <literal>format</literal> or |
| 1903 |  | <literal>regex</literal>. |
| 1904 | Â | </para>Â |
| 1905 | Â | <para>Â |
| 1906 |  | The <literal>--SKIPIF--</literal> section of the generated tests checks |
| 1907 |  | for the generated extension being loaded, the tests will automaticly be |
| 1908 |  | skiped if it is not available. Additional skip conditions can be added |
| 1909 |  | using the <literal><skipif></literal> tag. The content of the tag may either |
| 1910 |  | be a PHP expression that evaluates to <literal>true</literal> if the test |
| 1911 | Â | should be skipped or a complete code snippet that prints <literal>skip</literal>Â |
| 1912 |  | if the test is supposed to be skipped. A string describing the reason for |
| 1913 |  | the test being skipped may be added after the <literal>skip</literal> in  |
| 1914 |  | this case. |
| 1915 | Â | </para>Â |
| 1916 | Â | <para>Â |
| 1917 |  | Additional php.ini settings to be used for testing may be specified in |
| 1918 |  | a <literal><ini></literal> section. |
|  | 1881 | <title>ï¿½ï¿½ï¿½í¡¼ï¿½Ð¥ï¿½ï¿½ï¿½ï¿½È¥ï¿½ï¿½ï¿½ï¿½ï¿½</title> |
| Â | 1882 | <para>Â |
|  | 1883 | ï¿½ï¿½ï¿½í¡¼ï¿½Ð¥ï¿½ï¿½Æ¥ï¿½ï¿½È¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Î¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½È¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ <literal><test></literal> ������Ѥ��ޤ��� |
|  | 1884 | <literal><test></literal> �ˤ�<literal>name</literal> |
|  | 1885 | °���¸�ߤ��ޤ����ƥ��Ȥ�����ˤ����ե������ǥե������������ǡ� |
|  | 1886 | <literal>name</literal> �ϰ��ʤ��Ǥ���������������ޤ��� |
|  | 1887 | �ѿ��<literal>'-'</literal>��<literal>'_'</literal> |
|  | 1888 | ������Ѥ��뤳�ȤϤǤ��ޤ��󡣤��狼����������Υƥ������ꤹ���ϡ� |
|  | 1889 | <literal><test></literal> ����� <literal><title></literal> ������Ѥ��ޤ��� |
| Â | 1890 | </para>Â |
| Â | 1891 | <para>Â |
|  | 1892 | �ºݤ˼¹Ԥ�����HP �����ɤϡ�<literal><code></literal> |
|  | 1893 | ���������ǵ��Ҥ��ޤ����ƥ��ȷ��Ȥ��ƴ�������� <literal><result></literal> �����ǻ�ꤷ�ޤ����ǥե����� <literal>OK</literal> �Ǥ���PHP �Υƥ��ȥ������Ȥϡ� |
|  | 1894 | �ƥ��ȷ��ν�Ϥȴ�Ȥ����̤��ˡ�ǹԤ��ޤ��� |
|  | 1895 | ���줾�졢���ʸ�����Ƥ����printf ����Υץ졼���ۥ� |
|  | 1896 | (%d �Ͽ�ʤ� ��Ѥ�����ӡ����������ɽ���������ӤǤ� |
|  | 1897 | (�ܺ٤ϡ�PHP ��������<filename>README.TESTING*</filename> |
|  | 1898 | �򻲾Ȥ������)���ǥե����Ǥ�<literal>plain</literal> �⡼�ɤ�Ѥ��ޤ��� |
|  | 1899 | ��������Ѥ����ϡ�<literal><result></literal> �� <literal>mode</literal> °���iteral>format</literal> ���뤤�� <literal>regex</literal> ���ꤷ�ޤ��� |
| Â | 1900 | </para>Â |
| Â | 1901 | <para>Â |
|  | 1902 | �����줿�ƥ���� <literal>--SKIPIF--</literal> |
|  | 1903 | ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ï¡ï¿½ï¿½ï¿½ï¿½Î³ï¿½ï¿½ï¿½â¥¸ï¿½å¡¼ï¿½ë¤¬ï¿½í¡¼ï¿½É¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ë¤«ï¿½É¤ï¿½ï¿½ï¿½ï¿½ï¿½Ù¤Þ¤ï¿½ï¿½ï¿½Â |
|  | 1904 | ï¿½â¤·ï¿½í¡¼ï¿½É¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ê¤ï¿½ï¿½ï¿½ï¿½Ï¤ï¿½ï¿½Î¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Î¥Æ¥ï¿½ï¿½È¤ï¿½ï¿½Åªï¿½Ë¥ï¿½ï¿½ï¿½ï¿½Ã¥×¤ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½Â |
|  | 1905 | �������˥����å׾��ä����� <literal><skipif></literal> ������Ѥ��ޤ��� |
|  | 1906 | ���Υ�������ϡ�PHP �μ����뤤�ϥ�����ҤȤʤ����� |
|  | 1907 | ���ξ��ϡ�ɾ����� <literal>true</literal> |
|  | 1908 | �ξ��˥ƥ��Ȥ򥹥��åפ��ޤ���������Ҥξ��ϡ� |
|  | 1909 | ���ν�Ϥ� <literal>skip</literal> |
|  | 1910 | �Ȥʤ����ƥ��Ȥ򥹥��åפ��ޤ������ξ���<literal>skip</literal> |
|  | 1911 | ������ƥƥ��Ȥ򥹥��åפ����ͳ�����뤳�Ȥ����ޤ��� |
| Â | 1912 | </para>Â |
| Â | 1913 | <para>Â |
|  | 1914 | �ƥ��Ȼ��˻�Ѥ����ä�php.ini ���ˤĤ��Ƥ� <literal><ini></literal> ���������ǻ�ꤷ�ޤ��� |
| 1953 |  | Test code and the expected result |
| 1954 | Â | can be set using a <literal><test></literal>Â |
| 1955 |  | section within <literal><function></literal>. |
| 1956 |  | <literal><code></literal>, |
| 1957 |  | <literal><result></literal>, |
| 1958 |  | <literal><skipif></literal> and |
| 1959 | Â | <literal><ini></literal>Â |
| 1960 |  | may be used in there in the same way as in a global |
| 1961 |  | <literal><></literal> section. Use of the  |
| 1962 |  | <literal>name</literal> attribute to  |
| 1963 |  | <literal><test></literal> or the  |
| 1964 |  | <literal><title></literal> tag are not  |
| 1965 |  | supported within a function test. |
| 1966 | Â | </para>Â |
|  | 1948 | �ƥ��ȥ����ɤȴ�ϡ�<literal><function></literal> |
|  | 1949 | ��� <literal><test></literal> |
|  | 1950 | ���������ǻ�ꤷ�ޤ��� |
|  | 1951 | <literal><code></literal> �� <literal><result></literal>�� |
|  | 1952 | <literal><skipif></literal>�������� <literal><ini></literal> �ˤĤ��Ƥ⡢ |
|  | 1953 | ï¿½ï¿½ï¿½í¡¼ï¿½Ð¥ë¥»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½è¤¦ï¿½Ë»ï¿½Ñ¤Ç¤ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½Â |
|  | 1954 | �ؿ�ƥ��ȤǤϡ� |
|  | 1955 | <literal><test></literal> �������뤤�� <literal><title></literal> ������ <literal>name</literal> °��ϥ��ݡ��Ȥ��Ƥ��ޤ��� </para> |