Skip to content

Commit

Permalink
Merge pull request #37307 from owncloud/dependabot/composer/phpunit/p…
Browse files Browse the repository at this point in the history
…hpunit-8.5.4

[Tests-Only] Bump phpunit/phpunit from 7.5.20 to 8.5.4
  • Loading branch information
phil-davis authored Apr 26, 2020
2 parents 15df678 + a50a8b8 commit 245251f
Show file tree
Hide file tree
Showing 23 changed files with 201 additions and 96 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ vendor-bin/**/composer.lock

# Tests - auto-generated files
/data-autotest
/tests/.phpunit.result.cache
/tests/coverage*
/tests/karma-coverage
/tests/autoconfig*
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/Command/ListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testShortView($options, $expectedResult, $mountOptions) {
for ($i = 0; $i < $countResults; $i++) {
$this->assertEquals($expectedResult[$i]['mount_id'], $results[$i]['mount_id']);
$this->assertEquals($expectedResult[$i]['mount_point'], $results[$i]['mount_point']);
$this->assertContains($results[$i]['auth'], 'UserSession', true);
$this->assertStringContainsString($results[$i]['auth'], 'UserSession', true);
$this->assertEquals($expectedResult[$i]['type'], $results[$i]['type']);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/Panels/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ public function testGetPanel() {
$this->backendService->expects($this->once())->method('getBackends')->willReturn([]);
$this->backendService->expects($this->once())->method('getAvailableBackends')->willReturn([]);
$templateHtml = $this->panel->getPanel()->fetchPage();
$this->assertContains('<h2 class="app-name">External Storage</h2>', $templateHtml);
$this->assertStringContainsString('<h2 class="app-name">External Storage</h2>', $templateHtml);
}
}
2 changes: 1 addition & 1 deletion apps/files_external/tests/Panels/PersonalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ public function testGetPanel() {
$this->backendService->expects($this->once())->method('getBackends')->willReturn([]);
$this->backendService->expects($this->once())->method('getAvailableBackends')->willReturn([]);
$templateHtml = $this->panel->getPanel()->fetchPage();
$this->assertContains('<h2 class="app-name">External Storage</h2>', $templateHtml);
$this->assertStringContainsString('<h2 class="app-name">External Storage</h2>', $templateHtml);
}
}
13 changes: 10 additions & 3 deletions apps/files_trashbin/tests/ExpirationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,16 @@ public function testParseRetentionObligation($configValue, $expectedMinAge, $exp
);

$expiration = new Expiration($mockedConfig, $mockedTimeFactory);
$this->assertAttributeEquals($expectedMinAge, 'minAge', $expiration);
$this->assertAttributeEquals($expectedMaxAge, 'maxAge', $expiration);
$this->assertAttributeEquals($expectedCanPurgeToSaveSpace, 'canPurgeToSaveSpace', $expiration);
$expirationInternals = (array) $expiration;
$expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0minAge";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedMinAge, $expirationInternals[$expectedKey]);
$expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0maxAge";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedMaxAge, $expirationInternals[$expectedKey]);
$expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0canPurgeToSaveSpace";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedCanPurgeToSaveSpace, $expirationInternals[$expectedKey]);
}

public function timestampTestData() {
Expand Down
13 changes: 10 additions & 3 deletions apps/files_versions/tests/ExpirationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,16 @@ public function testParseRetentionObligation($configValue, $expectedMinAge, $exp
);

$expiration = new Expiration($mockedConfig, $mockedTimeFactory);
$this->assertAttributeEquals($expectedMinAge, 'minAge', $expiration);
$this->assertAttributeEquals($expectedMaxAge, 'maxAge', $expiration);
$this->assertAttributeEquals($expectedCanPurgeToSaveSpace, 'canPurgeToSaveSpace', $expiration);
$expirationInternals = (array) $expiration;
$expectedKey = "\0OCA\\Files_Versions\\Expiration\0minAge";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedMinAge, $expirationInternals[$expectedKey]);
$expectedKey = "\0OCA\\Files_Versions\\Expiration\0maxAge";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedMaxAge, $expirationInternals[$expectedKey]);
$expectedKey = "\0OCA\\Files_Versions\\Expiration\0canPurgeToSaveSpace";
$this->assertArrayHasKey($expectedKey, $expirationInternals);
$this->assertEquals($expectedCanPurgeToSaveSpace, $expirationInternals[$expectedKey]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"bamarni/composer-bin-plugin": "^1.4",
"jakub-onderka/php-console-highlighter": "^0.4",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^7.5",
"phpunit/phpunit": "^8.5",
"roave/security-advisories": "dev-master"
},
"require": {
Expand Down
156 changes: 103 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 245251f

Please sign in to comment.