Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-32bits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
php -f tests/enable_all.php

- name: PHPUnit
run: composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness
run: composer run test -- --exclude-group PRIMARY-azure --exclude-group PRIMARY-s3 --exclude-group PRIMARY-swift --exclude-group Memcached --exclude-group Redis --exclude-group RoutingWeirdness
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
php -f tests/enable_all.php

- name: PHPUnit memcached tests
run: composer run test -- --group Memcache,Memcached --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}
run: composer run test -- --group Memcache --group Memcached --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-nodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
php -f tests/enable_all.php

- name: PHPUnit nodb testsuite
run: composer run test -- --exclude-group DB,SLOWDB --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.nodb.xml' || '' }}
run: composer run test -- --exclude-group DB --exclude-group SLOWDB --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.nodb.xml' || '' }}

- name: Upload nodb code coverage
if: ${{ !cancelled() && matrix.coverage }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function testCharsetMailProvider(): void {
->with('core', 'mail_providers_enabled', true)
->willReturn(true);
$mailMessage = new MailProviderMessage();
$mailService = $this->createStubForIntersectionOfInterfaces([IService::class, IMessageSend::class]);
$mailService = $this->createMockForIntersectionOfInterfaces([IService::class, IMessageSend::class]);
$mailService->method('initiateMessage')
->willReturn($mailMessage);
$mailService->expects(self::once())
Expand Down
4 changes: 1 addition & 3 deletions apps/dav/tests/unit/Listener/OutOfOfficeListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
use Sabre\VObject\Reader;
use Test\TestCase;

/**
* @covers \OCA\DAV\Listener\OutOfOfficeListener
*/
#[\PHPUnit\Framework\Attributes\CoversClass(OutOfOfficeListener::class)]
class OutOfOfficeListenerTest extends TestCase {

private ServerFactory&MockObject $serverFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

use OCA\Settings\SetupChecks\AppDirsWithDifferentOwner;
use OCP\IL10N;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;

class AppDirsWithDifferentOwnerTest extends TestCase {
private IL10N $l10n;
private AppDirsWithDifferentOwner $check;

private IL10N&MockObject $l10n;

/**
* Holds a list of directories created during tests.
*
Expand All @@ -42,8 +44,6 @@ protected function setUp(): void {
* Then calls the 'getAppDirsWithDifferentOwner' method.
* The result is expected to be empty since
* there are no directories with different owners than the current user.
*
* @return void
*/
public function testAppDirectoryOwnersOk(): void {
$tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir';
Expand All @@ -69,8 +69,6 @@ public function testAppDirectoryOwnersOk(): void {
/**
* Calls the check for a none existing app root that is marked as not writable.
* It's expected that no error happens since the check shouldn't apply.
*
* @return void
*/
public function testAppDirectoryOwnersNotWritable(): void {
$tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir';
Expand All @@ -89,11 +87,9 @@ public function testAppDirectoryOwnersNotWritable(): void {

/**
* Removes directories created during tests.
*
* @after
* @return void
*/
public function removeTestDirectories() {
#[\PHPUnit\Framework\Attributes\After()]
public function removeTestDirectories(): void {
foreach ($this->dirsToRemove as $dirToRemove) {
rmdir($dirToRemove);
}
Expand Down
6 changes: 3 additions & 3 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else
fi

if ! [ -x "$PHPUNIT" ]; then
echo "phpunit executable not found, please install phpunit version >= 10.5 manually or via:" >&2
echo "phpunit executable not found, please install phpunit version >= 11.5 manually or via:" >&2
echo " composer install" >&2
exit 3
fi
Expand All @@ -69,8 +69,8 @@ PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2)
PHPUNIT_MAJOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f1)
PHPUNIT_MINOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f2)

if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 10 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 10 -a "$PHPUNIT_MINOR_VERSION" -ge 5 \) ]; then
echo "phpunit version >= 10.5 required. Version found: $PHPUNIT_VERSION" >&2
if ! [ "$PHPUNIT_MAJOR_VERSION" -gt 11 -o \( "$PHPUNIT_MAJOR_VERSION" -eq 11 -a "$PHPUNIT_MINOR_VERSION" -ge 5 \) ]; then
echo "phpunit version >= 11.5 required. Version found: $PHPUNIT_VERSION" >&2
exit 4
fi

Expand Down
5 changes: 2 additions & 3 deletions build/integration/composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"config": {
"platform": {
"php": "8.1"
"php": "8.2"
},
"sort-packages": true
},
"require-dev": {
"behat/behat": "^3.15",
"dms/phpunit-arraysubset-asserts": "^0.5",
"guzzlehttp/guzzle": "^7.9",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^11.5",
"sabre/dav": "^4.7",
"symfony/event-dispatcher": "^6.4"
}
Expand Down
Loading
Loading