mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
11bc153deb
* Rewriting and streamlining every unit test with data providers. All unit tests have been rewritten into PHPUnit data providers to reduce the amount of unnecessary code-reuse through out the test suite.
31 lines
630 B
PHP
31 lines
630 B
PHP
<?php
|
|
namespace Psalm\Tests;
|
|
|
|
use Psalm\Checker\FileChecker;
|
|
|
|
class BadFormatTest extends TestCase
|
|
{
|
|
/**
|
|
* @return void
|
|
*/
|
|
public function testMissingSemicolon()
|
|
{
|
|
$this->project_checker->registerFile(
|
|
'somefile.php',
|
|
'<?php
|
|
class A {
|
|
/** @var int|null */
|
|
protected $hello;
|
|
|
|
/** @return void */
|
|
function foo() {
|
|
$this->hello = 5
|
|
}
|
|
}'
|
|
);
|
|
|
|
$file_checker = new FileChecker('somefile.php', $this->project_checker);
|
|
$file_checker->visitAndAnalyzeMethods();
|
|
}
|
|
}
|