<commit_before><?php

namespace tests\TestCases;

use LumengPHP\DependencyInjection\PropertyInjection\PropertyInjectionParser;

/**
 * 属性注入解析程序测试
 *
 * @author Lumeng <<EMAIL>>
 */
class PropertyInjectionParserTest extends \PHPUnit_Framework_TestCase {

    public function testParse() {
        $class = 'tests\Commands\PropertyInjectionAwareCommand';
        $parser = new PropertyInjectionParser($class);
        $parser->parse();
        //$parser->dump('');
    }

}<commit_msg>属性注入功能开发<commit_after><?php

namespace tests\TestCases;

use LumengPHP\DependencyInjection\PropertyInjection\PropertyInjectionParser;

/**
 * 属性注入解析程序测试
 *
 * @author Lumeng <<EMAIL>>
 */
class PropertyInjectionParserTest extends \PHPUnit_Framework_TestCase {

    /**
     * @var string 
     */
    private $varDir;

    /**
     * @var string 
     */
    private $dumpPath;

    public function setUp() {
        $this->varDir = TEST_ROOT . '/var';
        if (!is_dir($this->varDir)) {
            mkdir($this->varDir);
        }

        $this->dumpPath = "{$this->varDir}/property-injection-aware-command-dump.php";

        if (file_exists($this->dumpPath)) {
            unlink($this->dumpPath);
        }
    }

    public function testParse() {
        $class = 'tests\Commands\PropertyInjectionAwareCommand';
        $parser = new PropertyInjectionParser($class);
        $parser->parse();
        $parser->dump($this->dumpPath);

        $this->assertFileExists($this->dumpPath);
    }

}
{'fraction_non_alphanumeric': 0.14016172506738545, 'fraction_numerical': 0.0, 'mean_word_length': 2.8976377952755907, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3624063', 'n_tokens_mistral': 473, 'n_tokens_neox': 469, 'n_words': 69}