Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormattos committed Apr 28, 2022
0 parents commit 4ceda88
Show file tree
Hide file tree
Showing 8 changed files with 5,426 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Nextcloud Behat context

Basic Behat steps for a Nextcloud app

## Install

```bash
composer require --dev libresign/nextcloud-behat
```
Create the file `behat.yml`
```yaml
default:
autoload:
'': '%paths.base%/features/bootstrap'
suites:
default:
contexts:
- Libresign\NextcloudBehat\NextcloudContext:
parameters:
# default value
test_password: 123456
# default value
admin_password: admin
paths:
- '%paths.base%/features'
extensions:
PhpBuiltin\Server:
verbose: false
rootDir: /var/www/html
host: localhost
```
Create the file `tests/features/bootstrap/FeatureContext.php` with this content:
```php
<?php
use Libresign\NextcloudBehat;
class FeatureContext extends NextcloudContext {
}
```

Then, now you can see all available steps:
```bash
vendor/bin/behat -dl
17 changes: 17 additions & 0 deletions behat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
default:
autoload:
'': '%paths.base%/features/bootstrap'
suites:
default:
contexts:
- Libresign\NextcloudBehat\NextcloudContext:
parameters:
test_password: 123456
admin_password: admin
paths:
- '%paths.base%/features'
extensions:
PhpBuiltin\Server:
verbose: false
rootDir: /var/www/html
host: localhost
30 changes: 30 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "librecode/nextcloud-behat",
"description": "Basic steps for a Nextcloud app",
"keywords": [
"php",
"behat",
"nextcloud"
],
"type": "library",
"license": "AGPL",
"prefer-stable": true,
"authors": [
{
"name": "Vitor Mattos",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.4",
"guzzlehttp/guzzle": "^7.4",
"phpunit/phpunit": "^9.5",
"behat/behat": "^3.10",
"libresign/behat-builtin-extension": "^0.3.0"
},
"autoload": {
"psr-4": {
"Libresign\\NextcloudBehat\\": "features/bootstrap/"
}
}
}
Loading

0 comments on commit 4ceda88

Please sign in to comment.