Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
tbf.ro
/
vendor
/
psy
/
psysh
/
test
/
Reflection
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
ReflectionLanguageConstructParameterTest.php
| Size :
2.23
KB
Copy
<?php /* * This file is part of Psy Shell. * * (c) 2012-2018 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy\Test\Reflection; use Psy\Reflection\ReflectionLanguageConstruct; use Psy\Reflection\ReflectionLanguageConstructParameter; class ReflectionLanguageConstructParameterTest extends \PHPUnit\Framework\TestCase { public function testOptions() { $keyword = new ReflectionLanguageConstruct('die'); $refl = new ReflectionLanguageConstructParameter($keyword, 'one', [ 'isArray' => false, 'defaultValue' => null, 'isOptional' => false, 'isPassedByReference' => false, ]); $this->assertNull($refl->getClass()); $this->assertEquals('one', $refl->getName()); $this->assertFalse($refl->isArray()); $this->assertTrue($refl->isDefaultValueAvailable()); $this->assertNull($refl->getDefaultValue()); $this->assertFalse($refl->isOptional()); $this->assertFalse($refl->isPassedByReference()); $reflTwo = new ReflectionLanguageConstructParameter($keyword, 'two', [ 'isArray' => true, 'isOptional' => true, 'isPassedByReference' => true, ]); $this->assertNull($refl->getClass()); $this->assertEquals('two', $reflTwo->getName()); $this->assertTrue($reflTwo->isArray()); $this->assertFalse($reflTwo->isDefaultValueAvailable()); $this->assertNull($reflTwo->getDefaultValue()); $this->assertTrue($reflTwo->isOptional()); $this->assertTrue($reflTwo->isPassedByReference()); $refl = new ReflectionLanguageConstructParameter($keyword, 'three', [ 'defaultValue' => 3, ]); $this->assertNull($refl->getClass()); $this->assertEquals('three', $refl->getName()); $this->assertFalse($refl->isArray()); $this->assertTrue($refl->isDefaultValueAvailable()); $this->assertEquals(3, $refl->getDefaultValue()); $this->assertFalse($refl->isOptional()); $this->assertFalse($refl->isPassedByReference()); } }
Back