Skip to content

Commit 66704de

Browse files
authored
Merge pull request #7 from studservis/update_guzzle
Update phpunit
2 parents fc9c0b2 + af7036e commit 66704de

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"require-dev": {
1010
"ext-json": "*",
11-
"phpunit/phpunit": "~5.7.25"
11+
"phpunit/phpunit": "^9.6"
1212
},
1313
"license": "MIT",
1414
"autoload": {

phpunit.xml.dist

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php"
3-
colors="true"
4-
convertErrorsToExceptions="true"
5-
convertNoticesToExceptions="true"
6-
convertWarningsToExceptions="true"
7-
stopOnFailure="false">
8-
<testsuites>
9-
<testsuite>
10-
<directory>./tests</directory>
11-
</testsuite>
12-
</testsuites>
13-
<filter>
14-
<whitelist>
15-
<directory suffix=".php">src</directory>
16-
</whitelist>
17-
</filter>
18-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="default">
10+
<directory>./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
</phpunit>

tests/ApiTest.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,34 @@ public function testPostReceipt()
8787
$this->assertFalse(true, 'Client exception');
8888
}
8989

90-
$recipeJson = '{"type":"SALE","timeout":300,"taxMode":"SIMPLE_WO","positions":[{"name":"\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438","type":"SERVICE","quantity":1,"price":116700,"priceSum":116700}],"payments":[{"sum":116700,"type":"CASHLESS"}],"attributes":{"email":"[email protected]","phone":"+70000000000"},"total":{"priceSum":116700},"deviceId":123}';
90+
$recipeJson = '{
91+
"type":"SALE",
92+
"timeout":300,
93+
"taxMode":"SIMPLE_WO",
94+
"positions":[
95+
{
96+
"name":"\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438",
97+
"type":"SERVICE",
98+
"quantity":1,
99+
"price":116700,
100+
"priceSum":116700
101+
}
102+
],
103+
"payments":[
104+
{
105+
"sum":116700,
106+
"type":"CASHLESS"
107+
}
108+
],
109+
"attributes":{
110+
"email":"[email protected]",
111+
"phone":"+70000000000"
112+
},
113+
"total":{
114+
"priceSum":116700
115+
},
116+
"deviceId":123
117+
}';
91118

92119
$this->assertArrayHasKey('status', $response);
93120
$this->assertArrayHasKey('id', $response);

0 commit comments

Comments
 (0)