com php-src: Revert "Add tests for ReflectionZendExtension": ext/reflection/tests/ReflectionZendExtension_basic1.phpt
ext/reflection/tests/ReflectionZendExtension_error00 1.phpt ext/reflection/tests/ReflectionZendExtension_toS tring.phpt
| From: | Fabien Villepinte | Date: | Mon, 21 Oct 2019 19:31:36 +0000 |
| Subject: | com php-src: Revert "Add tests for ReflectionZendExtension": ext/reflection/tests/ReflectionZendExtension_basic1.phpt ext/reflection/tests/ReflectionZendExtension_error00 1.phpt ext/reflection/tests/ReflectionZendExtension_toS tring.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108981@lists.php.net to get a copy of this message | ||
Commit: 7ce85c34fff400f46659b12775b72b344ab6af29
Author: Fabien Villepinte <fabien.villepinte@gmail.com> Mon, 21 Oct 2019 21:31:36
+0200
Parents: 4194e0415b02827b0d5eeff13771eb6642955b0f
Branches: PHP-7..4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7ce85c34fff400f46659b12775b72b344ab6af29
Log:
Revert "Add tests for ReflectionZendExtension"
This reverts commit 4194e0415b02827b0d5eeff13771eb6642955b0f.
There were already tests for this class.
Changed paths:
D ext/reflection/tests/ReflectionZendExtension_basic1.phpt
D ext/reflection/tests/ReflectionZendExtension_error001.phpt
D ext/reflection/tests/ReflectionZendExtension_toString.phpt
Diff:
diff --git a/ext/reflection/tests/ReflectionZendExtension_basic1.phpt
b/ext/reflection/tests/ReflectionZendExtension_basic1.phpt
deleted file mode 100644
index ee89002a1db..00000000000
--- a/ext/reflection/tests/ReflectionZendExtension_basic1.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-ReflectionZendExtension: basic tests for accessors
---SKIPIF--
-<?php
-$zendExtensions = get_loaded_extensions(true);
-if (!in_array('Zend OPcache', $zendExtensions)) {
- die('SKIP the Zend OPcache extension not available');
-}
-?>
---FILE--
-<?php
-$rze = new ReflectionZendExtension('Zend OPcache');
-
-var_dump($rze->getName());
-var_dump($rze->getVersion() === PHP_VERSION);
-var_dump($rze->getAuthor());
-var_dump($rze->getURL());
-var_dump($rze->getCopyright());
-?>
---EXPECT--
-string(12) "Zend OPcache"
-bool(true)
-string(17) "Zend Technologies"
-string(20) "http://www.zend.com/"
-string(13) "Copyright (c)"
diff --git a/ext/reflection/tests/ReflectionZendExtension_error001.phpt
b/ext/reflection/tests/ReflectionZendExtension_error001.phpt
deleted file mode 100644
index 2e5b44be6c7..00000000000
--- a/ext/reflection/tests/ReflectionZendExtension_error001.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-ReflectionZendExtension: error with invalid extension name
---FILE--
-<?php
-try {
- new ReflectionZendExtension('foo-bar-baz');
-} catch (ReflectionException $e) {
- echo $e->getMessage();
-}
-?>
---EXPECT--
-Zend Extension foo-bar-baz does not exist
diff --git a/ext/reflection/tests/ReflectionZendExtension_toString.phpt
b/ext/reflection/tests/ReflectionZendExtension_toString.phpt
deleted file mode 100644
index 4db8cce8797..00000000000
--- a/ext/reflection/tests/ReflectionZendExtension_toString.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-ReflectionZendExtension: basic test for __toString()
---SKIPIF--
-<?php
-$zendExtensions = get_loaded_extensions(true);
-if (!in_array('Zend OPcache', $zendExtensions)) {
- die('SKIP the Zend OPcache extension not available');
-}
-?>
---FILE--
-<?php
-$rze = new ReflectionZendExtension('Zend OPcache');
-
-$str = (string)$rze;
-
-$methods = [
- 'getName',
- 'getVersion',
- 'getAuthor',
- 'getURL',
- 'getCopyright',
-];
-
-foreach ($methods as $method) {
- $prop = $rze->{$method}();
- if (strpos($str, $prop) === false) {
- echo "The result of $method() ($prop) is not found in: $str\n";
- }
-}
-?>
-===DONE===
---EXPECT--
-===DONE===