Skip to content

Commit 97579b3

Browse files
committed
Add php-codesniffer and scripts for running tests and phpcs
1 parent 3359baa commit 97579b3

File tree

4 files changed

+72
-9
lines changed

4 files changed

+72
-9
lines changed

Diff for: composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"guzzlehttp/guzzle": "^6.2"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^6.1"
19+
"phpunit/phpunit": "^6.1",
20+
"squizlabs/php_codesniffer": "^3.0"
21+
},
22+
"scripts": {
23+
"phpcs": "phpcs --standard=PSR2 src",
24+
"test": "phpunit -c tests/phpunit.xml"
2025
}
2126
}

Diff for: composer.lock

+58-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: tests/PHPCouchDB/ServerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ServerTest extends \PHPUnit\Framework\TestCase
1313
{
1414
public function testGetVersion() {
1515

16-
$couchdb1 = '{"couchdb":"Welcome","uuid":"fce3d5aabfe189c988273c0ffa8d375b","version":"6.6.0","vendor":{"name":"Ubuntu","version":"15.10"}}';
16+
$couchdb1 = '{"couchdb":"Welcome","uuid":"fce3d5aabfe189c988273c0ffa8d375b","version":"1.6.0","vendor":{"name":"Ubuntu","version":"15.10"}}';
1717
$response1 = new Response(200, [], $couchdb1);
1818

1919
// Create a mock and queue two responses.

Diff for: tests/phpunit.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<phpunit>
2+
<testsuites>
3+
<testsuite name="PHPCouchDBTests">
4+
<directory suffix="Test.php">.</directory>
5+
</testsuite>
6+
</testsuites>
7+
</phpunit>

0 commit comments

Comments
 (0)