Merge pull request #36617 from nextcloud/update/psr-container

chore: Update PSR container to 2.0.2
pull/37791/head
Simon L 2023-04-18 11:40:12 +07:00 committed by GitHub
commit 8fe22ebf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 5 deletions

@ -1 +1 @@
Subproject commit 17e4333c0642e3ab75a0a385274c84668aed74e1
Subproject commit fcc80609824be396681d5a68ba495f9b85c9b0bb

@ -121,6 +121,7 @@ class EncryptAllTest extends TestCase {
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);
$this->outputInterface->expects($this->any())->method('getFormatter')
@ -346,9 +347,11 @@ class EncryptAllTest extends TestCase {
['/user1/files/foo/subfile'],
);
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$this->outputInterface->expects($this->any())
->method('getFormatter')
->willReturn($this->createMock(OutputFormatterInterface::class));
->willReturn($outputFormatter);
$progressBar = new ProgressBar($this->outputInterface);
$this->invokePrivate($encryptAll, 'encryptUsersFiles', ['user1', $progressBar, '']);

@ -94,11 +94,11 @@ class TimestampFormatter implements OutputFormatterInterface {
/**
* Formats a message according to the given styles.
*
* @param string $message The message to style
* @return string The styled message, prepended with a timestamp using the
* @param string|null $message The message to style
* @return string|null The styled message, prepended with a timestamp using the
* log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
*/
public function format($message) {
public function format(?string $message): ?string {
if (!$this->formatter->isDecorated()) {
// Don't add anything to the output when we shouldn't
return $this->formatter->format($message);

@ -75,6 +75,7 @@ class ChangeKeyStorageRootTest extends TestCase {
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);
$this->outputInterface->expects($this->any())->method('getFormatter')

@ -71,6 +71,7 @@ class RepairTest extends TestCase {
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);
$this->output->expects($this->any())

@ -77,12 +77,15 @@ class DecryptAllTest extends TestCase {
->disableOriginalConstructor()->getMock();
$this->outputInterface = $this->getMockBuilder(OutputInterface::class)
->disableOriginalConstructor()->getMock();
$this->outputInterface->expects($this->any())->method('isDecorated')
->willReturn(false);
$this->userInterface = $this->getMockBuilder(UserInterface::class)
->disableOriginalConstructor()->getMock();
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('format')->willReturn('foo');
$outputFormatter->method('isDecorated')->willReturn(false);
$this->outputInterface->expects($this->any())->method('getFormatter')
->willReturn($outputFormatter);
@ -304,6 +307,7 @@ class DecryptAllTest extends TestCase {
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturn('foo');
$output = $this->createMock(OutputInterface::class);