Skip to content

Commit 5ccbfd6

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Serializer] Improve exception message in UnwrappingDenormalizer [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type Update security.nl.xlf [Validator] IBAN Check digits should always between 2 and 98 [Security] Populate translations for trans-unit 20 add missing plural translation messages filter out empty HTTP header parts [String] Fix folded in compat mode Remove calls to `getMockForAbstractClass()` [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode [Serializer] Fix type for missing property add test for JSON response with null as content [Filesystem] Fix dumpFile `stat failed` error hitting custom handler Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty. Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder` [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
2 parents c981e0e + bd3fee3 commit 5ccbfd6

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

Diff for: Tests/ApplicationTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
use Symfony\Component\Console\SignalRegistry\SignalRegistry;
4545
use Symfony\Component\Console\Terminal;
4646
use Symfony\Component\Console\Tester\ApplicationTester;
47+
use Symfony\Component\Console\Tests\Fixtures\MockableAppliationWithTerminalWidth;
4748
use Symfony\Component\DependencyInjection\ContainerBuilder;
4849
use Symfony\Component\EventDispatcher\EventDispatcher;
4950
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -932,7 +933,9 @@ public function testRenderExceptionEscapesLines()
932933

933934
public function testRenderExceptionLineBreaks()
934935
{
935-
$application = $this->getMockBuilder(Application::class)->addMethods(['getTerminalWidth'])->getMock();
936+
$application = $this->getMockBuilder(MockableAppliationWithTerminalWidth::class)
937+
->onlyMethods(['getTerminalWidth'])
938+
->getMock();
936939
$application->setAutoExit(false);
937940
$application->expects($this->any())
938941
->method('getTerminalWidth')
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
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+
}

Diff for: Tests/Question/QuestionTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ public function testSetAutocompleterValuesInvalid($values)
157157
public function testSetAutocompleterValuesWithTraversable()
158158
{
159159
$question1 = new Question('Test question 1');
160-
$iterator1 = $this->getMockForAbstractClass(\IteratorAggregate::class);
160+
$iterator1 = $this->createMock(\IteratorAggregate::class);
161161
$iterator1
162162
->expects($this->once())
163163
->method('getIterator')
164164
->willReturn(new \ArrayIterator(['Potato']));
165165
$question1->setAutocompleterValues($iterator1);
166166

167167
$question2 = new Question('Test question 2');
168-
$iterator2 = $this->getMockForAbstractClass(\IteratorAggregate::class);
168+
$iterator2 = $this->createMock(\IteratorAggregate::class);
169169
$iterator2
170170
->expects($this->once())
171171
->method('getIterator')

0 commit comments

Comments
 (0)