Skip to content

Commit 5cbe10c

Browse files
committed
tests: combined PHP 7.1 tests
1 parent 2535229 commit 5cbe10c

File tree

6 files changed

+51
-71
lines changed

6 files changed

+51
-71
lines changed

tests/PhpGenerator/ClassType.from.expect

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,27 @@ class Class4
6666
const THE_CONSTANT = 9;
6767

6868
}
69+
70+
class Class5
71+
{
72+
public function func1(\A $a, ?\B $b, \C $c = null, \D $d = null, \E $e, ?int $i = 1, ?array $arr = [])
73+
{
74+
}
75+
76+
77+
public function func2(): ?\stdClass
78+
{
79+
}
80+
81+
82+
public function func3(): void
83+
{
84+
}
85+
}
86+
87+
class Class6
88+
{
89+
const THE_PRIVATE_CONSTANT = 9;
90+
const THE_PUBLIC_CONSTANT = 9;
91+
92+
}

tests/PhpGenerator/ClassType.from.php71.expect

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/PhpGenerator/ClassType.from.php71.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/PhpGenerator/ClassType.from.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ $obj = new Abc\Class3;
2222
$obj->prop2 = 1;
2323
$res[] = (new Factory)->fromClassReflection(new \ReflectionObject($obj));
2424
$res[] = ClassType::from(Abc\Class4::class);
25+
$res[] = ClassType::from(Abc\Class5::class);
26+
$res[] = ClassType::from(Abc\Class6::class);
2527

2628
Assert::matchFile(__DIR__ . '/ClassType.from.expect', implode("\n", $res));

tests/PhpGenerator/fixtures/classes.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,28 @@ class Class4
7171
{
7272
const THE_CONSTANT = 9;
7373
}
74+
75+
/** */
76+
class Class5
77+
{
78+
public function func1(\A $a, ?\B $b, ?\C $c = null, \D $d = null, \E $e, ?int $i = 1, ?array $arr = [])
79+
{
80+
}
81+
82+
83+
public function func2(): ?\stdClass
84+
{
85+
}
86+
87+
88+
public function func3(): void
89+
{
90+
}
91+
}
92+
93+
94+
class Class6
95+
{
96+
private const THE_PRIVATE_CONSTANT = 9;
97+
public const THE_PUBLIC_CONSTANT = 9;
98+
}

tests/PhpGenerator/fixtures/classes.php71.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)