Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15cd8cf

Browse files
committed
minor #33194 [Console] Fix incomplete output mock (derrabus)
This PR was merged into the 4.3 branch. Discussion ---------- [Console] Fix incomplete output mock | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A Backport from #33153. Merging this up should fix the broken tests on 4.4 and master. Commits ------- 6ecbcf6 [Console] Fix incomplete output mock.
2 parents 9714831 + 6ecbcf6 commit 15cd8cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Console/Tests/Helper/DumperTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ public static function tearDownAfterClass(): void
3737
*/
3838
public function testInvoke($variable)
3939
{
40-
$dumper = new Dumper($this->getMockBuilder(OutputInterface::class)->getMock());
40+
$output = $this->getMockBuilder(OutputInterface::class)->getMock();
41+
$output->method('isDecorated')->willReturn(false);
42+
43+
$dumper = new Dumper($output);
4144

4245
$this->assertDumpMatchesFormat($dumper($variable), $variable);
4346
}

0 commit comments

Comments
 (0)