1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/tests/ForbiddenCodeTest.php
2017-05-26 20:05:57 -04:00

32 lines
731 B
PHP

<?php
namespace Psalm\Tests;
class ForbiddenCodeTest extends TestCase
{
use Traits\FileCheckerInvalidCodeParseTestTrait;
/**
* @return array
*/
public function providerFileCheckerInvalidCodeParse()
{
return [
'varDump' => [
'<?php
var_dump("hello");',
'error_message' => 'ForbiddenCode',
],
'execTicks' => [
'<?php
`rm -rf`;',
'error_message' => 'ForbiddenCode',
],
'exec' => [
'<?php
shell_exec("rm -rf");',
'error_message' => 'ForbiddenCode',
],
];
}
}