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:
Nihal 2017-05-08 12:02:18 +05:30
parent eb9e72f3b2
commit 7f72398eb6
5 changed files with 32 additions and 0 deletions

View File

@ -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

View 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();
?>

View File

@ -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

View 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();
?>

View File

@ -0,0 +1,6 @@
// Test pragma of php - pragma version.
%module php_pragma
%pragma(php) version= "1.5"