From cdae9845ac7c223d12bafc0fcd146cfae2c61363 Mon Sep 17 00:00:00 2001 From: valmat Date: Sun, 6 Apr 2014 00:10:59 +0600 Subject: Changed the test php/phpt/class_obj/005-static-prop.phpt Included checking the static properties: https://github.com/CopernicaMarketingSoftware/PHP-CPP/commit/ffdccb83d460791202bdb258dbb9106da877da3b --- tests/cpp/main.cpp | 7 +++++- tests/php/dbg.php | 12 ++++++++++ tests/php/phpt/class_obj/004-static-prop.phpt | 19 ---------------- tests/php/phpt/class_obj/005-static-prop.phpt | 32 +++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 20 deletions(-) delete mode 100644 tests/php/phpt/class_obj/004-static-prop.phpt create mode 100644 tests/php/phpt/class_obj/005-static-prop.phpt diff --git a/tests/cpp/main.cpp b/tests/cpp/main.cpp index 6d1eab3..84d95d8 100644 --- a/tests/cpp/main.cpp +++ b/tests/cpp/main.cpp @@ -52,7 +52,12 @@ extern "C" customClass.property("CONSTANT1", "some string", Php::Const); customClass.property("EXP", 2.718281828459, Php::Const); customClass.property("CONSTANT2", -2582341, Php::Const); - customClass.property("CONSTANT1", true, Php::Const); + customClass.property("CONSTANT3", true, Php::Const); + + customClass.property("StatProp1", "some string", Php::Static); + customClass.property("Exp", 2.718281828459, Php::Static); + customClass.property("StatProp2", -2582341, Php::Static); + customClass.property("StatProp3", true, Php::Static); // add the class to the extension extension.add(customClass); diff --git a/tests/php/dbg.php b/tests/php/dbg.php index 2040f01..003c494 100644 --- a/tests/php/dbg.php +++ b/tests/php/dbg.php @@ -12,3 +12,15 @@ + +var_dump( TestBaseClass\MyClass::CONSTANT1 ); +var_dump( TestBaseClass\MyClass::EXP ); +var_dump( TestBaseClass\MyClass::CONSTANT2 ); +var_dump( TestBaseClass\MyClass::CONSTANT3 ); + +var_dump( TestBaseClass\MyClass::$StatProp1 ); +var_dump( TestBaseClass\MyClass::$Exp ); +var_dump( TestBaseClass\MyClass::$StatProp2 ); +var_dump( TestBaseClass\MyClass::$StatProp3 ); +TestBaseClass\MyClass::$StatProp2 = "otherval"; +var_dump( TestBaseClass\MyClass::$StatProp2 ); diff --git a/tests/php/phpt/class_obj/004-static-prop.phpt b/tests/php/phpt/class_obj/004-static-prop.phpt deleted file mode 100644 index 4073247..0000000 --- a/tests/php/phpt/class_obj/004-static-prop.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Test class with static property and class constant ---SKIPIF-- - ---FILEEOF-- - +--FILEEOF-- +