Skip to content

Commit cdabf78

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Security] remove deprecated conditions in supports and authenticate methods from AccessListener class [Tests] Replace `setMethods()` by `onlyMethods()` and `addMethods()`
2 parents 138fa49 + 845dd21 commit cdabf78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/ApplicationTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ public function testFindAlternativesOutput()
734734

735735
public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces()
736736
{
737-
$application = $this->getMockBuilder(Application::class)->setMethods(['getNamespaces'])->getMock();
737+
$application = $this->getMockBuilder(Application::class)->onlyMethods(['getNamespaces'])->getMock();
738738
$application->expects($this->once())
739739
->method('getNamespaces')
740740
->willReturn(['foo:sublong', 'bar:sub']);
@@ -894,7 +894,7 @@ public function testRenderExceptionEscapesLines()
894894

895895
public function testRenderExceptionLineBreaks()
896896
{
897-
$application = $this->getMockBuilder(Application::class)->setMethods(['getTerminalWidth'])->getMock();
897+
$application = $this->getMockBuilder(Application::class)->addMethods(['getTerminalWidth'])->getMock();
898898
$application->setAutoExit(false);
899899
$application->expects($this->any())
900900
->method('getTerminalWidth')
@@ -1121,7 +1121,7 @@ public function testRunReturnsIntegerExitCode()
11211121
{
11221122
$exception = new \Exception('', 4);
11231123

1124-
$application = $this->getMockBuilder(Application::class)->setMethods(['doRun'])->getMock();
1124+
$application = $this->getMockBuilder(Application::class)->onlyMethods(['doRun'])->getMock();
11251125
$application->setAutoExit(false);
11261126
$application->expects($this->once())
11271127
->method('doRun')
@@ -1160,7 +1160,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
11601160
{
11611161
$exception = new \Exception('', 0);
11621162

1163-
$application = $this->getMockBuilder(Application::class)->setMethods(['doRun'])->getMock();
1163+
$application = $this->getMockBuilder(Application::class)->onlyMethods(['doRun'])->getMock();
11641164
$application->setAutoExit(false);
11651165
$application->expects($this->once())
11661166
->method('doRun')
@@ -1203,7 +1203,7 @@ public function testRunReturnsExitCodeOneForNegativeExceptionCode($exceptionCode
12031203
{
12041204
$exception = new \Exception('', $exceptionCode);
12051205

1206-
$application = $this->getMockBuilder(Application::class)->setMethods(['doRun'])->getMock();
1206+
$application = $this->getMockBuilder(Application::class)->onlyMethods(['doRun'])->getMock();
12071207
$application->setAutoExit(false);
12081208
$application->expects($this->once())
12091209
->method('doRun')

0 commit comments

Comments
 (0)