diff vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 5fb285c0d0e3
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php	Thu Apr 26 11:26:54 2018 +0100
+++ b/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php	Tue Jul 10 15:07:59 2018 +0100
@@ -12,7 +12,8 @@
 namespace Psy\Test\Formatter;
 
 use Psy\Formatter\SignatureFormatter;
-use Psy\Reflection\ReflectionConstant;
+use Psy\Reflection\ReflectionClassConstant;
+use Psy\Reflection\ReflectionConstant_;
 
 class SignatureFormatterTest extends \PHPUnit\Framework\TestCase
 {
@@ -39,7 +40,7 @@
                 defined('HHVM_VERSION') ? 'function implode($arg1, $arg2 = null)' : 'function implode($glue, $pieces)',
             ],
             [
-                new ReflectionConstant($this, 'FOO'),
+                ReflectionClassConstant::create($this, 'FOO'),
                 'const FOO = "foo value"',
             ],
             [
@@ -56,6 +57,30 @@
                 . 'extends PhpParser\NodeVisitorAbstract '
                 . 'implements PhpParser\NodeVisitor',
             ],
+            [
+                new \ReflectionFunction('array_chunk'),
+                'function array_chunk($arg, $size, $preserve_keys = unknown)',
+            ],
+            [
+                new \ReflectionClass('Psy\Test\Formatter\Fixtures\BoringTrait'),
+                'trait Psy\Test\Formatter\Fixtures\BoringTrait',
+            ],
+            [
+                new \ReflectionMethod('Psy\Test\Formatter\Fixtures\BoringTrait', 'boringMethod'),
+                'public function boringMethod($one = 1)',
+            ],
+            [
+                new ReflectionConstant_('E_ERROR'),
+                'define("E_ERROR", 1)',
+            ],
+            [
+                new ReflectionConstant_('PHP_VERSION'),
+                'define("PHP_VERSION", "' . PHP_VERSION . '")',
+            ],
+            [
+                new ReflectionConstant_('__LINE__'),
+                'define("__LINE__", null)', // @todo show this as `unknown` in red or something?
+            ],
         ];
     }