mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix test failures
This commit is contained in:
parent
8b5e066ba6
commit
23a414a2b3
@ -47,7 +47,7 @@ class ClassTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$stmts = self::$parser->parse('<?php
|
||||
class Foo {}
|
||||
(new fooFoo());
|
||||
(new foo());
|
||||
');
|
||||
|
||||
$file_checker = new FileChecker('somefile.php', $stmts);
|
||||
|
@ -46,7 +46,7 @@ function fooFoo(int $a) : string {
|
||||
$issue_data = IssueBuffer::getIssueData()[0];
|
||||
$this->assertSame('somefile.php', $issue_data['file_path']);
|
||||
$this->assertSame('error', $issue_data['type']);
|
||||
$this->assertSame("The given return type 'string' for foo is incorrect, got 'int'", $issue_data['message']);
|
||||
$this->assertSame("The given return type 'string' for fooFoo is incorrect, got 'int'", $issue_data['message']);
|
||||
$this->assertSame(2, $issue_data['line_number']);
|
||||
$this->assertSame(
|
||||
'string',
|
||||
@ -124,7 +124,7 @@ function fooFoo() {
|
||||
$issue_data = IssueBuffer::getIssueData()[0];
|
||||
$this->assertSame('somefile.php', $issue_data['file_path']);
|
||||
$this->assertSame('error', $issue_data['type']);
|
||||
$this->assertSame('Method foo does not have a return type', $issue_data['message']);
|
||||
$this->assertSame('Method fooFoo does not have a return type', $issue_data['message']);
|
||||
$this->assertSame(2, $issue_data['line_number']);
|
||||
$this->assertSame(
|
||||
'function fooFoo() {',
|
||||
|
@ -47,7 +47,7 @@ class MethodSignatureTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @expectedException \Psalm\Exception\CodeException
|
||||
* @expectedExceptionMessage Method B::foo has fewer arguments than parent method A::foo
|
||||
* @expectedExceptionMessage Method B::fooFoo has fewer arguments than parent method A::foo
|
||||
*/
|
||||
public function testFewerArguments()
|
||||
{
|
||||
@ -72,7 +72,7 @@ class MethodSignatureTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @expectedException \Psalm\Exception\CodeException
|
||||
* @expectedExceptionMessage Argument 1 of B::foo has wrong type 'bool', expecting 'int' as defined by A::foo
|
||||
* @expectedExceptionMessage Argument 1 of B::fooFoo has wrong type 'bool', expecting 'int' as defined by A::foo
|
||||
*/
|
||||
public function testDifferentArguments()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user