diff --git a/codeception.yml b/codeception.yml new file mode 100644 index 0000000..405575a --- /dev/null +++ b/codeception.yml @@ -0,0 +1,11 @@ +namespace: Psalm\PhpUnitPlugin\Tests +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs +actor_suffix: Tester +extensions: + enabled: + - Codeception\Extension\RunFailed diff --git a/composer.json b/composer.json index 2711931..d20be8e 100755 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ "vimeo/psalm": "^3.0 || dev-master" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.3.1" + "squizlabs/php_codesniffer": "^3.3.1", + "codeception/base": "^2.5", + "weirdan/codeception-psalm-module": "dev-master" }, "extra": { "psalm": { @@ -26,13 +28,20 @@ "Psalm\\PhpUnitPlugin\\": ["."] } }, + "autoload-dev": { + "psr-4": { + "Psalm\\PhpUnitPlugin\\Tests\\": ["tests/_support"] + } + }, "scripts" : { "check": [ "@cs-check", - "@analyze" + "@analyze", + "@test" ], "analyze": "psalm", "cs-check": "phpcs", - "cs-fix": "phpcbf" + "cs-fix": "phpcbf", + "test": "codecept run -v" } } diff --git a/psalm.xml.dist b/psalm.xml.dist index fa52336..ea3eb4a 100755 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -9,13 +9,16 @@ - + + - - + + + + diff --git a/tests/_data/.gitkeep b/tests/_data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/_output/.gitignore b/tests/_output/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/tests/_output/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/tests/_run/.gitignore b/tests/_run/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/tests/_run/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/_support/AcceptanceTester.php b/tests/_support/AcceptanceTester.php new file mode 100644 index 0000000..abbab72 --- /dev/null +++ b/tests/_support/AcceptanceTester.php @@ -0,0 +1,26 @@ +