Skip to content

Commit f418791

Browse files
committed
add test on chaining errors
1 parent e437a71 commit f418791

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/gracefulTests.js

+10
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ describe('Test graceful mode', function() {
8888
// the supressError mode cant guarantee $foo to be included into the arguments list
8989
});
9090

91+
it('test method chains', function () {
92+
// test.parser.debug = true;
93+
var ast = test.parseEval([
94+
'$controller->expects($this->once())',
95+
'->'
96+
].join('\n'));
97+
ast.children[0].kind.should.be.exactly('propertylookup');
98+
ast.children[0].what.kind.should.be.exactly('call');
99+
ast.children[0].what.what.kind.should.be.exactly('propertylookup');
100+
});
91101

92102
});
93103

0 commit comments

Comments
 (0)