Skip to content

Commit

Permalink
[Codeception MailHog] Refactoring + unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
morismor committed May 25, 2020
1 parent 5aa917b commit 65ec8fb
Show file tree
Hide file tree
Showing 7 changed files with 861 additions and 415 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: php-actions/composer@v1 # or alternative dependency management

# Run unit
- name: PHPUnit (php-actions)
uses: php-actions/phpunit@v1
with:
config: phpunit.xml
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dev
.idea
composer.lock
vendor/

# CI runtime
build/
target/
.php_cs.cache
14 changes: 14 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);

return PhpCsFixer\Config::create()
->setRules([
'concat_space' => ['spacing' => 'one'],
'phpdoc_align' => false,
'phpdoc_to_comment' => false,
'header_comment' => false,
])
->setFinder($finder);
18 changes: 17 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,31 @@
{
"name": "Eric Martel",
"email": "[email protected]"
},
{
"name": "Lamoda developers",
"homepage": "https://tech.lamoda.ru/"
}
],
"require": {
"php": "~7.2",
"guzzlehttp/guzzle": "^6.1",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"codeception/codeception": "^4.0",
"ericmartel/codeception-email": "^1.0",
"guzzlehttp/guzzle": "^6.1"
"friendsofphp/php-cs-fixer": "^2.15.0"
},
"autoload": {
"psr-4": {
"Codeception\\Module\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Codeception\\Module\\Tests\\": "tests"
}
}
}
17 changes: 17 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
colors="true"
executionOrder="random"
resolveDependencies="true">
<testsuites>
<testsuite name="Main">
<directory>tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 65ec8fb

Please sign in to comment.