From b112c13a41674e9c307f42c6054e3036ca3e6960 Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Sun, 25 Jan 2015 02:18:58 +0000 Subject: [PATCH] Test strict code calling weak code and vice-versa --- Zend/tests/typehints/strict_call_weak.phpt | 17 +++++++++++++++++ Zend/tests/typehints/strict_call_weak_2.inc | 7 +++++++ .../typehints/strict_call_weak_explicit.phpt | 17 +++++++++++++++++ .../typehints/strict_call_weak_explicit_2.inc | 7 +++++++ Zend/tests/typehints/weak_call_strict.phpt | 16 ++++++++++++++++ Zend/tests/typehints/weak_call_strict_2.inc | 7 +++++++ .../typehints/weak_explicit_call_strict.phpt | 16 ++++++++++++++++ 7 files changed, 87 insertions(+) create mode 100644 Zend/tests/typehints/strict_call_weak.phpt create mode 100644 Zend/tests/typehints/strict_call_weak_2.inc create mode 100644 Zend/tests/typehints/strict_call_weak_explicit.phpt create mode 100644 Zend/tests/typehints/strict_call_weak_explicit_2.inc create mode 100644 Zend/tests/typehints/weak_call_strict.phpt create mode 100644 Zend/tests/typehints/weak_call_strict_2.inc create mode 100644 Zend/tests/typehints/weak_explicit_call_strict.phpt diff --git a/Zend/tests/typehints/strict_call_weak.phpt b/Zend/tests/typehints/strict_call_weak.phpt new file mode 100644 index 00000000000..45b87b042ab --- /dev/null +++ b/Zend/tests/typehints/strict_call_weak.phpt @@ -0,0 +1,17 @@ +--TEST-- +strict_types=1 code calling strict_types=0 code +--FILE-- + +--EXPECTF-- +Catchable fatal error: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc on line 5 + diff --git a/Zend/tests/typehints/strict_call_weak_2.inc b/Zend/tests/typehints/strict_call_weak_2.inc new file mode 100644 index 00000000000..cba55128977 --- /dev/null +++ b/Zend/tests/typehints/strict_call_weak_2.inc @@ -0,0 +1,7 @@ + +--EXPECTF-- +Catchable fatal error: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc on line 5 + diff --git a/Zend/tests/typehints/strict_call_weak_explicit_2.inc b/Zend/tests/typehints/strict_call_weak_explicit_2.inc new file mode 100644 index 00000000000..d26c84761c0 --- /dev/null +++ b/Zend/tests/typehints/strict_call_weak_explicit_2.inc @@ -0,0 +1,7 @@ + +--EXPECT-- +Success! diff --git a/Zend/tests/typehints/weak_call_strict_2.inc b/Zend/tests/typehints/weak_call_strict_2.inc new file mode 100644 index 00000000000..fe2a17f6820 --- /dev/null +++ b/Zend/tests/typehints/weak_call_strict_2.inc @@ -0,0 +1,7 @@ + +--EXPECT-- +Success!