Skip to content

Commit

Permalink
Add unit tests for all API controller methods
Browse files Browse the repository at this point in the history
Signed-off-by: MB-Finski <[email protected]>
  • Loading branch information
MB-Finski committed Dec 8, 2023
1 parent 4a4d558 commit 059130c
Show file tree
Hide file tree
Showing 36 changed files with 3,754 additions and 110 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ js/
.vscode-upload.json
.*.sw*
node_modules
vendor
tests/.phpunit.result.cache
.php-cs-fixer.cache

20 changes: 20 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);
// SPDX-FileCopyrightText: Sami Finnilä <[email protected]>
// SPDX-License-Identifier: AGPL-3.0-or-later

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('l10n')
->notPath('src')
->notPath('vendor')
->in(__DIR__);
return $config;
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Authors

* Julien Veyssier <[email protected]> (Developper)

* Sami Finnilä <[email protected]> (Secondary developer)
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- Php unit tests for all API controller methods @MB-Finski

## 1.0.18 – 2023-07-20

### Changed
Expand Down
36 changes: 36 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "nextcloud/integration_gitlab",
"authors": [
{
"name": "Julien Veyssier",
"email": "[email protected]"
},
{
"name": "Sami Finnilä",
"email": "[email protected]"
}
],
"require": {
"league/commonmark": "^2.3",
"php": "^8.0"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm.phar",
"test:unit": "phpunit -c tests/phpunit.xml"
},
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "8.0"
}
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^9.5",
"nextcloud/coding-standard": "^1.1"
}
}
Loading

0 comments on commit 059130c

Please sign in to comment.