Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test OAuth requests using pact.io as mock server OP#40804 #22

Merged
merged 2 commits into from
Jan 27, 2022
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ jobs:
run: npm run test:unit

- name: PHP Unit Tests
run: make test
run: |
git clone --depth 1 https://github.com/nextcloud/server.git -b v23.0.0
make test
8 changes: 8 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
use Composer\Autoload\ClassLoader;

include_once __DIR__.'/vendor/autoload.php';
if (file_exists(__DIR__ . '/server')) {
$serverPath = __DIR__ . '/server';
} else {
$serverPath = __DIR__ . '/../..';
}

$classLoader = new ClassLoader();
$classLoader->addPsr4("OCA\\OpenProject\\Service\\", __DIR__ . '/lib/Service', true);
$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true);
$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true);
$classLoader->addPsr4("OCA\\OpenProject\\AppInfo\\", __DIR__ . '/lib/AppInfo', true);
$classLoader->register();

set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php');
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"pact-foundation/pact-php": "^7.1"
}
}
Loading