add more validation test cases
parent
596d7f0bef
commit
2ab7fc037a
|
@ -170,7 +170,7 @@ class ValidationTest extends TestCase
|
||||||
$this->assertEquals($symbolInfo[$testCaseFile], $symbols, "defn->symbolInformation does not match");
|
$this->assertEquals($symbolInfo[$testCaseFile], $symbols, "defn->symbolInformation does not match");
|
||||||
|
|
||||||
|
|
||||||
$skipped = ['false', 'true', 'null', 'FALSE', 'TRUE', 'NULL', 'parent', 'PARENT', 'self', 'static'];
|
// $skipped = ['false', 'true', 'null', 'FALSE', 'TRUE', 'NULL', 'parent', 'PARENT', 'self', 'static'];
|
||||||
$skipped = [];
|
$skipped = [];
|
||||||
foreach ($this->getIndex($parserKinds[0], $frameworkName)->references as $key=>$value) {
|
foreach ($this->getIndex($parserKinds[0], $frameworkName)->references as $key=>$value) {
|
||||||
foreach ($skipped as $s) {
|
foreach ($skipped as $s) {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public static function suite()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
"hi" => BYE
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public static function suite()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
BYE => "hi"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public static function suite()
|
||||||
|
{
|
||||||
|
return array(T_NEW);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
interface A {
|
||||||
|
function b ($a = MY_CONSTANT);
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A {
|
||||||
|
static function a() {
|
||||||
|
$b = new a;
|
||||||
|
$c = $b->a();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A {
|
||||||
|
public static function getInitializer(ClassLoader $loader)
|
||||||
|
{
|
||||||
|
return \Closure::bind(function () use ($loader) {
|
||||||
|
$loader->prefixesPsr0 = ComposerStaticInitIncludePath::$prefixesPsr0;
|
||||||
|
|
||||||
|
}, null, ClassLoader::class);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A {
|
||||||
|
public function testRequest()
|
||||||
|
{
|
||||||
|
$request = Request::create((new Url('httpkernel_test.empty'))->toString());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace1;
|
||||||
|
|
||||||
|
use \NS1\C, \NS1\I, \NS1\T;
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use namespace\a\b as c;
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
use \a\b as c;
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
class B {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class A {
|
||||||
|
function a () {
|
||||||
|
$a = (new B)->hi();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
$process = new A;
|
||||||
|
array($process::OUT, '123');
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public static function suite()
|
||||||
|
{
|
||||||
|
$suite = new self('Database related tests');
|
||||||
|
$suite->addTestFile(__DIR__ . DS . 'Database' . DS . 'ConnectionTest.php');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public function typesProvider()
|
||||||
|
{
|
||||||
|
$self = $this;
|
||||||
|
$self->assertTrue("HI");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MyNamespace;
|
||||||
|
|
||||||
|
class A extends B {
|
||||||
|
function a () {
|
||||||
|
$a = new static();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue