File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 4141use Symfony \Component \Console \SignalRegistry \SignalRegistry ;
4242use Symfony \Component \Console \Terminal ;
4343use Symfony \Component \Console \Tester \ApplicationTester ;
44+ use Symfony \Component \Console \Tests \Fixtures \MockableAppliationWithTerminalWidth ;
4445use Symfony \Component \DependencyInjection \ContainerBuilder ;
4546use Symfony \Component \EventDispatcher \EventDispatcher ;
4647use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
@@ -876,7 +877,9 @@ public function testRenderExceptionEscapesLines()
876877
877878 public function testRenderExceptionLineBreaks ()
878879 {
879- $ application = $ this ->getMockBuilder (Application::class)->addMethods (['getTerminalWidth ' ])->getMock ();
880+ $ application = $ this ->getMockBuilder (MockableAppliationWithTerminalWidth::class)
881+ ->onlyMethods (['getTerminalWidth ' ])
882+ ->getMock ();
880883 $ application ->setAutoExit (false );
881884 $ application ->expects ($ this ->any ())
882885 ->method ('getTerminalWidth ' )
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <[email protected] > 7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Symfony \Component \Console \Tests \Fixtures ;
13+
14+ use Symfony \Component \Console \Application ;
15+
16+ class MockableAppliationWithTerminalWidth extends Application
17+ {
18+ public function getTerminalWidth (): int
19+ {
20+ return 0 ;
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments