Skip to content

Commit 1e5ea52

Browse files
committed
WIP
1 parent 175617c commit 1e5ea52

File tree

2 files changed

+11
-48
lines changed

2 files changed

+11
-48
lines changed

README.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,30 +1482,6 @@ return [
14821482
'lifetime_in_seconds' => env('DOCUWARE_CACHE_LIFETIME_IN_SECONDS', 60),
14831483
],
14841484
],
1485-
1486-
/*
1487-
|--------------------------------------------------------------------------
1488-
| Tests
1489-
|--------------------------------------------------------------------------
1490-
|
1491-
*/
1492-
'tests' => [
1493-
'file_cabinet_id' => env('DOCUWARE_TESTS_FILE_CABINET_ID'),
1494-
'dialog_id' => env('DOCUWARE_TESTS_DIALOG_ID'),
1495-
'basket_id' => env('DOCUWARE_TESTS_BASKET_ID'),
1496-
'section' => (int) env('DOCUWARE_TESTS_SECTION'),
1497-
'organization_id' => env('DOCUWARE_TESTS_ORGANIZATION_ID'),
1498-
'document_id' => (int) env('DOCUWARE_TESTS_DOCUMENT_ID'),
1499-
'document_file_size_preview' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE_PREVIEW'),
1500-
'document_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_FILE_SIZE'),
1501-
'document_count' => (int) env('DOCUWARE_TESTS_DOCUMENT_COUNT'),
1502-
'document_thumbnail_mime_type' => env('DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_MIME_TYPE'),
1503-
'document_thumbnail_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENT_THUMBNAIL_FILE_SIZE'),
1504-
'document_ids' => json_decode(env('DOCUWARE_TESTS_DOCUMENTS_IDS', '[]')),
1505-
'documents_file_size' => (int) env('DOCUWARE_TESTS_DOCUMENTS_FILE_SIZE'),
1506-
'field_name' => env('DOCUWARE_TESTS_FIELD_NAME'),
1507-
'field_name_2' => env('DOCUWARE_TESTS_FIELD_NAME_2'),
1508-
],
15091485
];
15101486
```
15111487

@@ -1520,18 +1496,21 @@ cp phpunit.xml.dist phpunit.xml
15201496
Modify environment variables in the phpunit.xml-file:
15211497

15221498
```xml
1523-
<env name="DOCUWARE_TOKEN" value=""/>
1499+
<env name="APP_KEY" value="base64:F+mHMDBbavrsp/I3WYA5lDSwD22I/0wQG4eM3csq/lo="/>
15241500
<env name="DOCUWARE_URL" value="https://domain.docuware.cloud"/>
15251501
<env name="DOCUWARE_USERNAME" value="user@domain.test"/>
15261502
<env name="DOCUWARE_PASSWORD" value="password"/>
15271503
<env name="DOCUWARE_PASSPHRASE" value="passphrase"/>
15281504
<env name="DOCUWARE_TIMEOUT" value="30"/>
1505+
<env name="DOCUWARE_CACHE_DRIVER" value="file" />
15291506
<env name="DOCUWARE_CACHE_LIFETIME_IN_SECONDS" value="0"/>
15301507

15311508
<env name="DOCUWARE_TESTS_FILE_CABINET_ID" value=""/>
15321509
<env name="DOCUWARE_TESTS_DIALOG_ID" value=""/>
15331510
<env name="DOCUWARE_TESTS_BASKET_ID" value=""/>
15341511
<env name="DOCUWARE_TESTS_ORGANIZATION_ID" value=""/>
1512+
<env name="DOCUWARE_TESTS_GROUP_ID" value=""/>
1513+
<env name="DOCUWARE_TESTS_ROLE_ID" value=""/>
15351514
```
15361515

15371516
Run the tests:

phpunit.xml.dist

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
executionOrder="random"
15-
failOnWarning="true"
16-
failOnRisky="true"
17-
failOnEmptyTestSuite="true"
18-
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
213
<testsuites>
224
<testsuite name="codebar Test Suite">
235
<directory>tests</directory>
246
</testsuite>
257
</testsuites>
268
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
309
<report>
3110
<html outputDirectory="build/coverage"/>
3211
<text outputFile="build/coverage.txt"/>
@@ -43,7 +22,7 @@
4322
<env name="DOCUWARE_PASSWORD" value="password"/>
4423
<env name="DOCUWARE_PASSPHRASE" value="passphrase"/>
4524
<env name="DOCUWARE_TIMEOUT" value="30"/>
46-
<env name="DOCUWARE_CACHE_DRIVER" value="array" />
25+
<env name="DOCUWARE_CACHE_DRIVER" value="file" />
4726
<env name="DOCUWARE_CACHE_LIFETIME_IN_SECONDS" value="0"/>
4827

4928
<env name="DOCUWARE_TESTS_FILE_CABINET_ID" value="17eaf4ba-41a8-43ec-8be5-80a5f5f1eaf1"/>
@@ -53,4 +32,9 @@
5332
<env name="DOCUWARE_TESTS_GROUP_ID" value="ae49d31e-41ce-46b2-9ebb-64db58e90046"/>
5433
<env name="DOCUWARE_TESTS_ROLE_ID" value="2444928d-1312-44db-aa79-101f198ac946"/>
5534
</php>
35+
<source>
36+
<include>
37+
<directory suffix=".php">./src</directory>
38+
</include>
39+
</source>
5640
</phpunit>

0 commit comments

Comments
 (0)