mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
More tests fixed
This commit is contained in:
parent
ec85096c96
commit
3a2c457d87
@ -164,7 +164,6 @@ class FileDiffTest extends TestCase
|
||||
$b_doc = $b_stmt->getDocComment();
|
||||
|
||||
$this->assertNotNull($b_doc, var_export($a_doc, true));
|
||||
assert(!is_null($b_doc));
|
||||
|
||||
$this->assertNotSame($a_doc, $b_doc);
|
||||
|
||||
@ -188,7 +187,10 @@ class FileDiffTest extends TestCase
|
||||
if (isset($a_stmt->stmts)) {
|
||||
$this->assertTrue(isset($b_stmt->stmts));
|
||||
|
||||
/** @psalm-suppress UndefinedPropertyFetch */
|
||||
/**
|
||||
* @psalm-suppress UndefinedPropertyFetch
|
||||
* @psalm-suppress MixedArgument
|
||||
*/
|
||||
$this->assertTreesEqual($a_stmt->stmts, $b_stmt->stmts);
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,6 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
|
||||
$method_symbol_location = $codebase->getSymbolLocation('somefile.php', 'B\A::foo()');
|
||||
|
||||
$this->assertNotNull($method_symbol_location);
|
||||
assert(!is_null($method_symbol_location));
|
||||
$this->assertSame(10, $method_symbol_location->getLineNumber());
|
||||
$this->assertSame(21, $method_symbol_location->getColumn());
|
||||
|
||||
@ -128,7 +127,6 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
|
||||
$property_symbol_location = $codebase->getSymbolLocation('somefile.php', 'B\A::$a');
|
||||
|
||||
$this->assertNotNull($property_symbol_location);
|
||||
assert(!is_null($property_symbol_location));
|
||||
$this->assertSame(6, $property_symbol_location->getLineNumber());
|
||||
$this->assertSame(31, $property_symbol_location->getColumn());
|
||||
|
||||
@ -136,7 +134,6 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
|
||||
$constant_symbol_location = $codebase->getSymbolLocation('somefile.php', 'B\A::BANANA');
|
||||
|
||||
$this->assertNotNull($constant_symbol_location);
|
||||
assert(!is_null($constant_symbol_location));
|
||||
$this->assertSame(8, $constant_symbol_location->getLineNumber());
|
||||
$this->assertSame(27, $constant_symbol_location->getColumn());
|
||||
|
||||
@ -144,7 +141,6 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
|
||||
$function_symbol_location = $codebase->getSymbolLocation('somefile.php', 'B\bar()');
|
||||
|
||||
$this->assertNotNull($function_symbol_location);
|
||||
assert(!is_null($function_symbol_location));
|
||||
$this->assertSame(13, $function_symbol_location->getLineNumber());
|
||||
$this->assertSame(17, $function_symbol_location->getColumn());
|
||||
}
|
||||
@ -217,7 +213,6 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
|
||||
$symbol_at_position = $codebase->getReferenceAtPosition('somefile.php', new Position(10, 30));
|
||||
|
||||
$this->assertNotNull($symbol_at_position);
|
||||
assert(!is_null($symbol_at_position));
|
||||
|
||||
$this->assertSame('type: int|null', $symbol_at_position[0]);
|
||||
|
||||
|
@ -10,11 +10,13 @@ use Psalm\Internal\PluginManager\PluginList;
|
||||
/** @group PluginManager */
|
||||
class PluginListTest extends TestCase
|
||||
{
|
||||
/** @var ObjectProphecy */
|
||||
/** @var ObjectProphecy<ConfigFile> */
|
||||
private $config_file;
|
||||
/** @var ObjectProphecy */
|
||||
|
||||
/** @var ObjectProphecy<Config> */
|
||||
private $config;
|
||||
/** @var ObjectProphecy */
|
||||
|
||||
/** @var ObjectProphecy<ComposerLock> */
|
||||
private $composer_lock;
|
||||
|
||||
public function setUp()
|
||||
|
@ -151,7 +151,10 @@ class ProjectAnalyzerTest extends TestCase
|
||||
)
|
||||
);
|
||||
|
||||
$this->project_analyzer->getCodebase()->config->after_codebase_populated[] = get_class($hook);
|
||||
$hook_class = get_class($hook);
|
||||
|
||||
/** @psalm-suppress TypeCoercion see vimeo/psalm#1397 */
|
||||
$this->project_analyzer->getCodebase()->config->after_codebase_populated[] = $hook_class;
|
||||
|
||||
ob_start();
|
||||
$this->project_analyzer->check('tests/DummyProject');
|
||||
|
Loading…
x
Reference in New Issue
Block a user