expectExceptionMessage('ParseError - somefile.php:9'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'hello = 5 } }', ); $this->analyzeFile('somefile.php', new Context()); } public function testClassMethodWithNoStmts(): void { $this->expectExceptionMessage('ParseError - somefile.php:3'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } public function testInterfaceWithProperties(): void { $this->expectExceptionMessage('ParseError - somefile.php:3'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } public function testTypingReturnType(): void { $this->expectExceptionMessage('ParseError - somefile.php:5'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } public function testOverriddenUse(): void { $this->expectExceptionMessage('ParseError - somefile.php:6'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } public function testBadArray(): void { $this->expectExceptionMessage('ParseError - somefile.php:2'); $this->expectException(CodeException::class); $this->addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } }