diff --git a/phpjit/behat-rest-fr/behat.yml.dist b/phpjit/behat-rest-fr/behat.yml.dist new file mode 100644 index 00000000..c7cd5374 --- /dev/null +++ b/phpjit/behat-rest-fr/behat.yml.dist @@ -0,0 +1,32 @@ +default: + autoload: + '': '%paths.base%/tests/Behat/features' + suites: + default: + paths: + features: 'tests/Behat/features' + contexts: + - RestContextFr\RestContextFr + - Behat\MinkExtension\Context\MinkContext + - behatch:context:browser + - behatch:context:debug + - behatch:context:system + - behatch:context:json + - behatch:context:table + - behatch:context:rest + - behatch:context:xml + extensions: + Behat\Symfony2Extension: + kernel: + env: test + debug: true + bootstrap: config/bootstrap.php + path: src/Kernel.php + class: App\Kernel + Behat\MinkExtension: + base_url: "http://localhost/api" + sessions: + default: + symfony2: ~ + Behatch\Extension: ~ + diff --git a/phpjit/behat-rest-fr/config/services_test.yaml b/phpjit/behat-rest-fr/config/services_test.yaml new file mode 100644 index 00000000..8729f479 --- /dev/null +++ b/phpjit/behat-rest-fr/config/services_test.yaml @@ -0,0 +1,17 @@ +services: + _defaults: + autowire: true + autoconfigure: true + RestContextFr\RestContextFr: + public: true + arguments: + $request: '@behatch.http_call.request' + $httpCallResultPool: '@behatch.http_call.result_pool' + behatch.http_call.request: + class: Behatch\HttpCall\Request + arguments: + - '@behat.mink' + public: false + behatch.http_call.result_pool: + class: Behatch\HttpCall\HttpCallResultPool + public: false \ No newline at end of file diff --git a/phpjit/behat-rest-fr/features/demo.feature b/phpjit/behat-rest-fr/features/demo.feature new file mode 100644 index 00000000..4d459112 --- /dev/null +++ b/phpjit/behat-rest-fr/features/demo.feature @@ -0,0 +1,12 @@ +# This file contains a user story for demonstration only. +# Learn how to get started with Behat and BDD on Behat's website: +# http://behat.org/en/latest/quick_start.html + +Feature: + In order to prove that the Behat Symfony extension is correctly installed + As a user + I want to have a demo scenario + + Scenario: It receives a response from Symfony's kernel + When a demo scenario sends a request to "/" + Then the response should be received diff --git a/phpjit/behat-rest-fr/manifest.json b/phpjit/behat-rest-fr/manifest.json new file mode 100644 index 00000000..f1b2c343 --- /dev/null +++ b/phpjit/behat-rest-fr/manifest.json @@ -0,0 +1,9 @@ +{ + "copy-from-recipe": { + "behat.yml.dist": "behat.yml.dist", + "config/": "%CONFIG_DIR%/", + "features/": "features/", + "tests/": "tests/" + }, + "gitignore": ["/behat.yml"] +}