Skip to content

Commit 89f85a8

Browse files
committed
Fix tests
1 parent dcd6365 commit 89f85a8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/test/php/lang/ast/unittest/parse/OperatorTest.class.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,21 @@ public function prefix($operator) {
6464
);
6565
}
6666

67-
#[Test, Values(['=', '+=', '-=', '*=', '/=', '%=', '.=', '**=', '&=', '|=', '^=', '>>=', '<<=', '??=', '&&=', '||='])]
67+
#[Test, Values(['=', '+=', '-=', '*=', '/=', '%=', '.=', '**=', '&=', '|=', '^=', '>>=', '<<=', '??='])]
6868
public function assignment($operator) {
6969
$this->assertParsed(
7070
[new Assignment(new Variable('a', self::LINE), $operator, new Variable('b', self::LINE), self::LINE)],
7171
'$a '.$operator.' $b;'
7272
);
7373
}
7474

75+
#[Test, Values(['&&=', '||='])]
76+
public function logical_assignment($operator) {
77+
$assignment= new Assignment(new Variable('a', self::LINE), $operator, new Variable('b', self::LINE), self::LINE);
78+
$assignment->kind= 'logicalassignment';
79+
$this->assertParsed([$assignment], '$a '.$operator.' $b;');
80+
}
81+
7582
#[Test]
7683
public function assignment_to_offset() {
7784
$target= new OffsetExpression(new Variable('a', self::LINE), new Literal('0', self::LINE), self::LINE);

0 commit comments

Comments
 (0)