mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
32 lines
707 B
PHP
32 lines
707 B
PHP
<?php
|
|
namespace Psalm\Tests;
|
|
|
|
use Psalm\Context;
|
|
|
|
class BadFormatTest extends TestCase
|
|
{
|
|
/**
|
|
* @expectedException Psalm\Exception\CodeException
|
|
* @expectedExceptionMessage ParseError - somefile.php:9
|
|
* @return void
|
|
*/
|
|
public function testMissingSemicolon()
|
|
{
|
|
$this->addFile(
|
|
'somefile.php',
|
|
'<?php
|
|
class A {
|
|
/** @var int|null */
|
|
protected $hello;
|
|
|
|
/** @return void */
|
|
function foo() {
|
|
$this->hello = 5
|
|
}
|
|
}'
|
|
);
|
|
|
|
$this->analyzeFile('somefile.php', new Context());
|
|
}
|
|
}
|