1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/tests/ForeachTest.php

29 lines
626 B
PHP
Raw Normal View History

2016-12-12 05:41:11 +01:00
<?php
namespace Psalm\Tests;
class ForeachTest extends TestCase
2016-12-12 05:41:11 +01:00
{
use Traits\FileCheckerInvalidCodeParseTestTrait;
2017-01-13 20:07:23 +01:00
/**
* @return array
2017-01-13 20:07:23 +01:00
*/
public function providerFileCheckerInvalidCodeParse()
2016-12-12 05:41:11 +01:00
{
return [
'continueOutsideLoop' => [
'<?php
continue;',
'error_message' => 'ContinueOutsideLoop'
],
'invalidIterator' => [
'<?php
foreach (5 as $a) {
}',
'error_message' => 'InvalidIterator'
]
];
2016-12-12 05:41:11 +01:00
}
}