Add tests for PHP pragma version to both PHP5 and PHP7.
Pragma version to specify version of PHP5 and PHP7 extensions. See issue #360.
This commit is contained in:
parent
eb9e72f3b2
commit
7f72398eb6
5 changed files with 32 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ CPP_TEST_CASES += \
|
||||||
li_factory \
|
li_factory \
|
||||||
php_iterator \
|
php_iterator \
|
||||||
php_namewarn_rename \
|
php_namewarn_rename \
|
||||||
|
php_pragma \
|
||||||
|
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
||||||
|
|
|
||||||
12
Examples/test-suite/php/php_pragma_runme.php
Normal file
12
Examples/test-suite/php/php_pragma_runme.php
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require "tests.php";
|
||||||
|
require "php_pragma.php";
|
||||||
|
|
||||||
|
|
||||||
|
check::equal('1.5',(new ReflectionExtension('php_pragma'))->getVersion(),"1.5==version(php_pragma)");
|
||||||
|
|
||||||
|
check::done();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
@ -14,6 +14,7 @@ CPP_TEST_CASES += \
|
||||||
li_factory \
|
li_factory \
|
||||||
php_iterator \
|
php_iterator \
|
||||||
php_namewarn_rename \
|
php_namewarn_rename \
|
||||||
|
php_pragma \
|
||||||
|
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
||||||
|
|
|
||||||
12
Examples/test-suite/php5/php_pragma_runme.php
Normal file
12
Examples/test-suite/php5/php_pragma_runme.php
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require "tests.php";
|
||||||
|
require "php_pragma.php";
|
||||||
|
|
||||||
|
|
||||||
|
check::equal('1.5',(new ReflectionExtension('php_pragma'))->getVersion(),"1.5==version(php_pragma)");
|
||||||
|
|
||||||
|
check::done();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
6
Examples/test-suite/php_pragma.i
Normal file
6
Examples/test-suite/php_pragma.i
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
// Test pragma of php - pragma version.
|
||||||
|
|
||||||
|
%module php_pragma
|
||||||
|
|
||||||
|
%pragma(php) version= "1.5"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue