1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/tests/BadFormatTest.php
2018-09-30 11:34:51 -04:00

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());
}
}