diff options
author | valmat <ufabiz@gmail.com> | 2014-03-18 15:18:11 +0600 |
---|---|---|
committer | valmat <ufabiz@gmail.com> | 2014-03-18 15:18:11 +0600 |
commit | e8334afd7f2920b706a3d28250a3e2b6dbd49538 (patch) | |
tree | a92e2b1b67c22eaad7eb84a2138ede2dae12e873 /tests/php/phpt/base | |
parent | bfaed88493de0a3ebd7f2619cb11291cd09252b1 (diff) |
Unit tests. For description see https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/25#issuecomment-37882236
Diffstat (limited to 'tests/php/phpt/base')
-rw-r--r-- | tests/php/phpt/base/001.phpt | 14 | ||||
-rw-r--r-- | tests/php/phpt/base/002.phpt | 14 | ||||
-rw-r--r-- | tests/php/phpt/base/readme | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/php/phpt/base/001.phpt b/tests/php/phpt/base/001.phpt new file mode 100644 index 0000000..91175d7 --- /dev/null +++ b/tests/php/phpt/base/001.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test constructor & destructor +--SKIPIF-- +<?php if (!extension_loaded("extention_for_tests")) print "skip"; ?> +--FILEEOF-- +<?php + +new TestBaseClass\MyClass(); + + +echo PHP_EOL; +--EXPECT-- +MyCustomClass::MyCustomClass() +MyCustomClass::~MyCustomClass
\ No newline at end of file diff --git a/tests/php/phpt/base/002.phpt b/tests/php/phpt/base/002.phpt new file mode 100644 index 0000000..a6f611b --- /dev/null +++ b/tests/php/phpt/base/002.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test constructor & destructor +--SKIPIF-- +<?php if (!extension_loaded("extention_for_tests")) print "skip"; ?> +--FILEEOF-- +<?php + +echo count(new TestBaseClass\MyClass($x)); + +echo PHP_EOL; +--EXPECT-- +MyCustomClass::MyCustomClass() +MyCustomClass::~MyCustomClass +33
\ No newline at end of file diff --git a/tests/php/phpt/base/readme b/tests/php/phpt/base/readme new file mode 100644 index 0000000..6c89a94 --- /dev/null +++ b/tests/php/phpt/base/readme @@ -0,0 +1 @@ +tests iterator |