Skip to content

Commit d796ecc

Browse files
committed
update tests and add test for doc in constant
1 parent 3808de1 commit d796ecc

File tree

7 files changed

+50
-8
lines changed

7 files changed

+50
-8
lines changed

test/files/constants.in.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@
77
define('FIZ', 'BUZ');
88

99
const A = 1, B = 2;
10+
11+
if (!defined('ACME')) {
12+
define('ACME', 1);
13+
}
14+
15+
if (!defined('ACME')) {
16+
define('ACME', 2);
17+
}
18+
19+
\define( 'FOOBAR', /** @var int */ 0 );

test/files/constants.out.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
\define('FIZ', 'BUZ');
88

99
const A = 1, B = 2;
10+
11+
\define('ACME', 1);
12+
13+
\define(
14+
'FOOBAR',
15+
/** @var int */
16+
0
17+
);

test/files/globals.all.out.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<?php
2-
/** doc */
2+
/** @var string */
33
$a = 'a' . 'a';
44

5-
/** @doc */
5+
/** @var string $b */
66
$b = 'b' . 'b';
77

88
$c = 'c' . 'c';
99

1010
$d = 'd' . 'd';
11+
12+
/** doc */
13+
$x = 'x' . 'x';
14+
15+
/** @doc */
16+
$y = 'y' . 'y';

test/files/globals.doc.out.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
/** doc */
2+
/** @var string */
33
$a = 'a' . 'a';
44

5-
/** @doc */
5+
/** @var string $b */
66
$b = 'b' . 'b';

test/files/globals.in.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
/** doc */
2+
/** @var string */
33
$a = 'a' . 'a';
44

5-
/** @doc */
5+
/** @var string $b */
66
$GLOBALS['b'] = 'b' . 'b';
77

88
$c = 'c' . 'c';
@@ -25,3 +25,9 @@
2525

2626
function () {
2727
};
28+
29+
/** doc */
30+
$x = 'x' . 'x';
31+
32+
/** @doc */
33+
$GLOBALS['y'] = 'y' . 'y';

test/files/globals.no-doc.out.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
$c = 'c' . 'c';
33

44
$d = 'd' . 'd';
5+
6+
/** doc */
7+
$x = 'x' . 'x';
8+
9+
/** @doc */
10+
$y = 'y' . 'y';
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<?php
2-
/** doc */
2+
/** @var string */
33
$a = \null;
44

5-
/** @doc */
5+
/** @var string $b */
66
$b = \null;
77

88
$c = \null;
99

1010
$d = \null;
11+
12+
/** doc */
13+
$x = \null;
14+
15+
/** @doc */
16+
$y = \null;

0 commit comments

Comments
 (0)