<commit_before><?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'BaseCommandRunner.php';

class GenerateCestTest extends BaseCommandRunner {

    protected function setUp()
    {
        $this->makeCommand('\Codeception\Command\GenerateCest');
        $this->config = array(
            'class_name' => 'HobbitGuy',
            'path' => 'tests/shire',
        );
    }

    /**
     * @group command
     */
    public function testBasic()
    {
        $this->execute(array('suite' => 'shire', 'class' => 'HallUnderTheHill'));
        $this->assertEquals('tests/shire/HallUnderTheHillCest.php', $this->filename);

        $this->assertContains('use ', $this->content);
        $this->assertContains('class HallUnderTheHillCest', $this->content);
        $this->assertContains('public function _before(HobbitGuy $I)', $this->content);
        $this->assertContains('public function _after(HobbitGuy $I)', $this->content);
        $this->assertContains('public function tryToTest(HobbitGuy $I)', $this->content);
        $this->assertContains('Test was created in tests/shire/HallUnderTheHillCest.php', $this->output);        
    }<commit_msg>fixes test: don't include use in generated cest<commit_after><?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'BaseCommandRunner.php';

class GenerateCestTest extends BaseCommandRunner {

    protected function setUp()
    {
        $this->makeCommand('\Codeception\Command\GenerateCest');
        $this->config = array(
            'class_name' => 'HobbitGuy',
            'path' => 'tests/shire',
        );
    }

    /**
     * @group command
     */
    public function testBasic()
    {
        $this->execute(array('suite' => 'shire', 'class' => 'HallUnderTheHill'));
        $this->assertEquals('tests/shire/HallUnderTheHillCest.php', $this->filename);

        $this->assertContains('class HallUnderTheHillCest', $this->content);
        $this->assertContains('public function _before(HobbitGuy $I)', $this->content);
        $this->assertContains('public function _after(HobbitGuy $I)', $this->content);
        $this->assertContains('public function tryToTest(HobbitGuy $I)', $this->content);
        $this->assertContains('Test was created in tests/shire/HallUnderTheHillCest.php', $this->output);        
    }
{'fraction_non_alphanumeric': 0.15411712901805372, 'fraction_numerical': 0.0, 'mean_word_length': 3.3111954459203035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '3828570', 'n_tokens_mistral': 684, 'n_tokens_neox': 655, 'n_words': 117}