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