Skip to content

Commit 20e8e57

Browse files
committed
Add recipes created by initial composer install
1 parent d6bd764 commit 20e8e57

File tree

12 files changed

+1072
-2
lines changed

12 files changed

+1072
-2
lines changed

.env.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# define your env variables for the test env here
2+
KERNEL_CLASS='App\Kernel'
3+
APP_SECRET='$ecretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272

7373
composer.phar
7474
composer.lock
75-
symfony.lock
7675
yarn.lock
7776
.buildpath
7877
.project

config/bundles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
2525
WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true],
2626
FOS\HttpCacheBundle\FOSHttpCacheBundle::class => ['all' => true],
27-
// eZ Platform
2827
eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle::class => ['all' => true],
2928
eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle::class => ['all' => true],
3029
EzSystems\EzPlatformSolrSearchEngineBundle\EzSystemsEzPlatformSolrSearchEngineBundle::class => ['all' => true],

config/graphql/types/.gitignore

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
doctrine_migrations:
2+
dir_name: '%kernel.project_dir%/src/Migrations'
3+
# namespace is arbitrary but should be different from App\Migrations
4+
# as migrations classes should NOT be autoloaded
5+
namespace: DoctrineMigrations
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#webpack_encore:
2+
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
3+
# Available in version 1.2
4+
#cache: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
framework:
2+
validation:
3+
not_compromised_password: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
use Behat\Behat\Context\Context;
4+
use Symfony\Component\HttpFoundation\Request;
5+
use Symfony\Component\HttpFoundation\Response;
6+
use Symfony\Component\HttpKernel\KernelInterface;
7+
8+
/**
9+
* This context class contains the definitions of the steps used by the demo
10+
* feature file. Learn how to get started with Behat and BDD on Behat's website.
11+
*
12+
* @see http://behat.org/en/latest/quick_start.html
13+
*/
14+
class FeatureContext implements Context
15+
{
16+
/**
17+
* @var KernelInterface
18+
*/
19+
private $kernel;
20+
21+
/**
22+
* @var Response|null
23+
*/
24+
private $response;
25+
26+
public function __construct(KernelInterface $kernel)
27+
{
28+
$this->kernel = $kernel;
29+
}
30+
31+
/**
32+
* @When a demo scenario sends a request to :path
33+
*/
34+
public function aDemoScenarioSendsARequestTo(string $path)
35+
{
36+
$this->response = $this->kernel->handle(Request::create($path, 'GET'));
37+
}
38+
39+
/**
40+
* @Then the response should be received
41+
*/
42+
public function theResponseShouldBeReceived()
43+
{
44+
if ($this->response === null) {
45+
throw new \RuntimeException('No response received');
46+
}
47+
}
48+
}

features/bootstrap/bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = 'test');
4+
require dirname(__DIR__, 2).'/config/bootstrap.php';

features/demo.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file contains a user story for demonstration only.
2+
# Learn how to get started with Behat and BDD on Behat's website:
3+
# http://behat.org/en/latest/quick_start.html
4+
5+
Feature:
6+
In order to prove that the Behat Symfony extension is correctly installed
7+
As a user
8+
I want to have a demo scenario
9+
10+
Scenario: It receives a response from Symfony's kernel
11+
When a demo scenario sends a request to "/"
12+
Then the response should be received

0 commit comments

Comments
 (0)