1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
psalm/tests/Php40Test.php
2017-05-26 20:05:57 -04:00

43 lines
1.1 KiB
PHP

<?php
namespace Psalm\Tests;
class Php40Test extends TestCase
{
use Traits\FileCheckerValidCodeParseTestTrait;
/**
* @return array
*/
public function providerFileCheckerValidCodeParse()
{
return [
'extendOldStyleConstructor' => [
'<?php
class A {
/**
* @return string
*/
public function A() {
return "hello";
}
}
class B extends A {
public function __construct() {
parent::__construct();
}
}',
],
'sameNameMethodWithNewStyleConstructor' => [
'<?php
class A {
public function __construct(string $s) { }
/** @return void */
public function a(int $i) { }
}
new A("hello");',
],
];
}
}