This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface DebuggerInterface | |
{ | |
public function debug(); | |
} | |
// Should be used only for French context | |
class DebuggerForFrenchContext implements DebuggerInterface | |
{ | |
public function debug() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# services.yaml | |
App\Debug\DebuggerForFrenchContext: | |
tags: | |
- 'app.custom_debug_fr' | |
App\Debug\DebuggerCheeseForFrenchContext: | |
tags: | |
- 'app.custom_debug_fr' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// check_and_notify.php | |
function notifySlack(string $message): void | |
{ | |
$curl = curl_init(); | |
curl_setopt_array( | |
$curl, | |
[ | |
CURLOPT_URL => getSlackUrl(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// config.php | |
// config can be done with constant | |
const ENDPOINT_TO_CHECK = ['www.google.com', 'http://127.0.0.1:8000']; | |
const SLACK_CHANNEL = 'monitoring-web-app'; // channel where post the message | |
const SLACK_URL = 'https://slack.com/api/chat.postMessage'; | |
const SLACK_TOKEN= 'token given by slack'; | |
// config with function to fetch env var... | |
function getSlackUrl(): string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: User Authentication Background: | |
Given the user is already registered to the website Scenario: | |
Given the user is on the login page | |
When the user inputs the correct email address | |
And the user inputs the correct password | |
And the user clicks the Login button | |
Then the user should be authenticated | |
And the user should be redirected to their dashboard | |
And the user should be presented with a success message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: I should be able to update a Bookmark | |
Given I add "Content-Type" header equal to "application/json" | |
And I send a "PUT" request to "/bookmarks/a179e430-6356-4fb5-91b2-ead2e166fa77" with body: | |
""" | |
{ | |
"title": "bookmark_1 edited", | |
"author": "Adah edited", | |
"url": "www.such-url-1-edited.com", | |
"height": 25, | |
"width": 49, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class BookmarkTest extends TestCase | |
{ | |
public function testPut() | |
{ | |
$payload = [ | |
'title' => 'bookmark_1 edited' | |
'author' => 'Adah edited', | |
'url' => 'www.such-url-1-edited.com', | |
'height' => 25, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Search Api | |
In order to store document in Elasticsearch | |
As a developer | |
I want to partially update document into Elasticsearch | |
# Publish the message | |
Given I publish in 'search_indexing' messenger queue the following message: | |
| App\SearchBundle\Message\SearchIndexationMessage | {"type":"Product","operation":"UPDATE", "id": 42, "title": "Foo", "reference": null} | | |
# Consume the message | |
And I consume 1 messages in search_indexing messenger queue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Export a csv email | |
Given I publish in client_export messenger queue the following message: | |
| App\\Message\ExportMessage | {"emailTo":"[email protected]"} | | |
Then I consume 1 messages in user_export messenger queue | |
Then the user_export messenger queue should be empty | |
And 1 mail should be sent | |
And I open mail with subject "Your export file is ready" | |
And I should see "Your export file is ready, you can download it by clicking on this link : https://domain.docker.com/export_files/export_user" in mail | |
And the Excel file with glob "var/upload/async_export/*.xlsx" should contain: | |
| A1 | Fixture A ID | |