Skip to content

Commit 210e679

Browse files
committed
[Codeception MailHog] Refactoring + unittest
1 parent 5aa917b commit 210e679

File tree

7 files changed

+863
-415
lines changed

7 files changed

+863
-415
lines changed

.github/workflows/phpunit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: php-actions/composer@v1 # or alternative dependency management
16+
17+
# Run unit
18+
- name: PHPUnit (php-actions)
19+
uses: php-actions/phpunit@v1
20+
with:
21+
config: phpunit.xml

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Dev
2+
.idea
3+
composer.lock
4+
vendor/
5+
6+
# CI runtime
7+
build/
8+
target/
9+
.php_cs.cache

.php_cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->in(__DIR__);
6+
7+
return PhpCsFixer\Config::create()
8+
->setRules([
9+
'concat_space' => ['spacing' => 'one'],
10+
'phpdoc_align' => false,
11+
'phpdoc_to_comment' => false,
12+
'header_comment' => false,
13+
])
14+
->setFinder($finder);

composer.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,31 @@
66
{
77
"name": "Eric Martel",
88
"email": "[email protected]"
9+
},
10+
{
11+
"name": "Lamoda developers",
12+
"homepage": "https://tech.lamoda.ru/"
913
}
1014
],
1115
"require": {
16+
"php": "~7.2",
17+
"guzzlehttp/guzzle": "^6.1",
18+
"ext-json": "*"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^8.0",
22+
"codeception/codeception": "^4.0",
1223
"ericmartel/codeception-email": "^1.0",
13-
"guzzlehttp/guzzle": "^6.1"
24+
"friendsofphp/php-cs-fixer": "^2.15.0"
1425
},
1526
"autoload": {
1627
"psr-4": {
1728
"Codeception\\Module\\": "src"
1829
}
30+
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"Codeception\\Module\\Tests\\": "tests"
34+
}
1935
}
2036
}

phpunit.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
colors="true"
4+
executionOrder="random"
5+
resolveDependencies="true">
6+
<testsuites>
7+
<testsuite name="Main">
8+
<directory>tests/</directory>
9+
</testsuite>
10+
</testsuites>
11+
12+
<filter>
13+
<whitelist>
14+
<directory suffix=".php">src/</directory>
15+
</whitelist>
16+
</filter>
17+
</phpunit>

0 commit comments

Comments
 (0)