1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
psalm/tests/ConfigTest.php

31 lines
665 B
PHP
Raw Normal View History

2016-12-29 10:24:10 -05:00
<?php
namespace Psalm\Tests;
use PhpParser\ParserFactory;
use PHPUnit_Framework_TestCase;
use Psalm\Checker\FileChecker;
use Psalm\Config;
class ConfigTest extends PHPUnit_Framework_TestCase
{
protected static $file_filter;
public function setUp()
{
FileChecker::clearCache();
}
public function testBarebonesConfig()
{
$config = Config::loadFromXML('psalm.xml', '<?xml version="1.0"?>
<psalm>
<projectFiles>
<directory name="src" />
</projectFiles>
</psalm>');
$this->assertTrue($config->isInProjectDirs('src/main.php'));
$this->assertFalse($config->isInProjectDirs('main.php'));
}
}