Code Duplication    Length = 11-16 lines in 2 locations

src/PhpGitHooks/Tests/Application/PhpUnit/UnitTestPreCommitExecutorTest.php 2 locations

@@ 74-84 (lines=11) @@
71
    /**
72
     * @test
73
     */
74
    public function isEnabledAndSuccessful()
75
    {
76
        $this->process->shouldReceive('isSuccessful')->andReturn(true);
77
        $this->preCommitConfig->setExtraOptions(['enabled' => true, 'random-mode' => false, 'suite' => false]);
78
        $this->enabledMocks();
79
80
        $this->phpunitProcessBuilder->shouldReceive('getProcessBuilder')->andReturn($this->processBuilder);
81
        $this->phpunitProcessBuilder->shouldReceive('executeProcess');
82
83
        $this->unitTestPreCommitExecutor->run($this->outputInterface);
84
    }
85
86
    /**
87
     * @test
@@ 89-104 (lines=16) @@
86
    /**
87
     * @test
88
     */
89
    public function isEnabledAndSuccessfulWithSuite()
90
    {
91
        $this->process->shouldReceive('isSuccessful')->andReturn(true);
92
        $this->preCommitConfig->setExtraOptions([
93
            'enabled' => true,
94
            'random-mode' => false,
95
            'suite' => 'PhpGitHooks Unit Tests',
96
        ]);
97
        $this->enabledMocks();
98
99
        $this->phpunitProcessBuilder->shouldReceive('setSuite');
100
        $this->phpunitProcessBuilder->shouldReceive('getProcessBuilder')->andReturn($this->processBuilder);
101
        $this->phpunitProcessBuilder->shouldReceive('executeProcess');
102
103
        $this->unitTestPreCommitExecutor->run($this->outputInterface);
104
    }
105
106
    /**
107
     * @test