Update phpunit and friends
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Родитель
1706121077
Коммит
890903afe3
|
@ -28,6 +28,10 @@ jobs:
|
|||
- name: Install dependencies
|
||||
working-directory: nextcloud/apps/twofactor_u2f
|
||||
run: composer install
|
||||
- name: Fix php-parser on stable20 incompatibility with phpunit 9.3+
|
||||
if: ${{ matrix.nextcloud-version == 'stable20' }}
|
||||
working-directory: nextcloud/3rdparty
|
||||
run: composer require nikic/php-parser:4.10
|
||||
- name: Run tests
|
||||
working-directory: nextcloud/apps/twofactor_u2f
|
||||
run: composer run test:unit
|
||||
|
|
|
@ -11,3 +11,4 @@ composer.phar
|
|||
/.php_cs.cache
|
||||
|
||||
/tests/clover*.xml
|
||||
/tests/.phpunit.result.cache
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"yubico/u2flib-server": "^1.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.5.8",
|
||||
"phpunit/phpunit": "^9.5.0",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"nextcloud/coding-standard": "^0.3.0",
|
||||
"psalm/phar": "^4.3"
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -39,7 +39,7 @@ class ProviderTest extends TestCase {
|
|||
/** @var Provider */
|
||||
private $provider;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->l10n = $this->createMock(IFactory::class);
|
||||
|
|
|
@ -32,7 +32,7 @@ class SettingTest extends TestCase {
|
|||
/** @var Setting */
|
||||
private $setting;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
|
|
|
@ -35,7 +35,7 @@ class SettingsControllerTest extends TestCase {
|
|||
/** @var SettingsController */
|
||||
private $controller;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->createMock(IRequest::class);
|
||||
|
|
|
@ -20,7 +20,7 @@ class StateChangeActivityTest extends TestCase {
|
|||
/** @var StateChangeActivity */
|
||||
private $listener;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->activityManager = $this->createMock(IManager::class);
|
||||
|
|
|
@ -32,7 +32,7 @@ class StateChangeRegistryUpdaterTest extends TestCase {
|
|||
/** @var StateChangeRegistryUpdater */
|
||||
private $listener;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->providerRegistry = $this->createMock(IRegistry::class);
|
||||
|
|
|
@ -45,7 +45,7 @@ class U2FManagerTest extends TestCase {
|
|||
/** @var IEventDispatcher */
|
||||
private $eventDispatcher;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mapper = $this->createMock(RegistrationMapper::class);
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<phpunit bootstrap="bootstrap.php"
|
||||
verbose="true"
|
||||
timeoutForSmallTests="900"
|
||||
timeoutForMediumTests="900"
|
||||
timeoutForLargeTests="900">
|
||||
<testsuite name="U2F app tests">
|
||||
<directory suffix="Test.php">.</directory>
|
||||
</testsuite><!-- filters for code coverage -->
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">../l10n</directory>
|
||||
<directory suffix=".php">../tests</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<!-- and this is where your report will be written -->
|
||||
<log type="coverage-clover" target="./clover.unit.xml"/>
|
||||
</logging>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">../lib</directory>
|
||||
</include>
|
||||
<report>
|
||||
<clover outputFile="./clover.unit.xml"/>
|
||||
</report>
|
||||
</coverage>
|
||||
<testsuite name="U2F app tests">
|
||||
<directory>.</directory>
|
||||
</testsuite>
|
||||
</phpunit>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче