Dockerfile
FROM production as dev
USER root
| <?php | |
| return [ | |
| // ... | |
| Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], // should already be enabled. | |
| // .. | |
| Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['test' => true], | |
| Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['test' => true], | |
| ]; |
| <?php | |
| $this->sharingContext['key'] = $value; // set a value | |
| $value = $this->sharingContext['key']; // retrieve value |
| When I send a "POST" request to "/products/" with body: | |
| """ | |
| { | |
| "name": "Super cool drill", | |
| "price": 249.99, | |
| "category": {{ category_tools.id }} | |
| } | |
| """ |
| Given I store the "id" property of "category_tools" as "category_tools_id" | |
| When I send a "POST" request to "/products/" with body: | |
| """ | |
| { | |
| "name": "Super cool drill", | |
| "price": 249.99, | |
| "category": category_tools_id | |
| } | |
| """ |
| <?php | |
| /** @var Connection[] $connections */ | |
| $connections = $doctrine->getConnections(); | |
| foreach ($connections as $connection) { | |
| if ('pdo_sqlite' !== $connection->getDriver()->getName()) { | |
| throw new \RuntimeException('Meaningful message here'); | |
| } | |
| } |
| <?php | |
| $schemaTool = new SchemaTool($manager); | |
| $schemaTool->dropDatabase(); | |
| $schemaTool->createSchema($manager->getMetadataFactory()->getAllMetadata()); |
| doctrine: | |
| dbal: | |
| connections: | |
| default_connection: default | |
| # Override each connection | |
| default: | |
| driver: pdo_sqlite | |
| url: 'sqlite:' | |
| path: "%kernel.cache_dir%/test_db.sqlite" |
| doctrine: | |
| dbal: | |
| driver: pdo_sqlite | |
| url: 'sqlite:' | |
| path: "%kernel.cache_dir%/test_db.sqlite" |