Merge pull request #1054 from mailpoet/coverage-fix

Coverage fix [MAILPOET-1064]
This commit is contained in:
Tautvidas Sipavičius
2017-08-23 13:41:43 +03:00
committed by GitHub
5 changed files with 37 additions and 34 deletions

View File

@@ -154,7 +154,6 @@ class RoboFile extends \Robo\Tasks {
function testUnit($opts=['file' => null, 'xml' => false]) {
$this->loadEnv();
$this->_exec('vendor/bin/codecept build -c codeception.unit.yml');
$command = 'vendor/bin/codecept run unit -c codeception.unit.yml -f '.(($opts['file']) ? $opts['file'] : '');
@@ -166,9 +165,8 @@ class RoboFile extends \Robo\Tasks {
function testCoverage($opts=['file' => null, 'xml' => false]) {
$this->loadEnv();
$this->_exec('vendor/bin/codecept build -c codeception.unit.yml');
$command = join(' ', array(
'vendor/bin/codecept run -c codeception.unit.yml ',
'vendor/bin/codecept run unit -c codeception.unit.yml ',
(($opts['file']) ? $opts['file'] : ''),
'--coverage',
($opts['xml']) ? '--coverage-xml' : '--coverage-html'

View File

@@ -21,28 +21,6 @@ modules:
user: ''
password: ''
dump: tests/_data/dump.sql
WPLoader:
wpRootFolder: /wp-core
dbName: wordpress
dbHost: mysql
dbUser: wordpress
dbPassword: wordpress
wpDebug: false
tablePrefix: wp_
domain: wordpress
plugins: ['mailpoet/mailpoet.php']
activatePlugins: ['mailpoet/mailpoet.php']
WPWebDriver:
host: chrome
url: 'http://wordpress'
browser: chrome
port: 4444
window_size: '1024x768'
restart: true
wait: 0
adminUsername: admin
adminPassword: password
adminPath: /wp-admin
coverage:
enabled: true
whitelist:

View File

@@ -20,7 +20,7 @@
},
"require-dev": {
"codeception/aspect-mock": "^2.0",
"codeception/codeception": "2.2.11",
"codeception/codeception": "2.3.5",
"codeception/verify": "^0.3.3",
"consolidation/robo": "^1.0.5",
"henrikbjorn/lurker": "^1.2",

17
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "f24637851f65aaddf31f499e9512a62a",
"content-hash": "3c6a5b45c2c80ffa51e3faa28d218aba",
"packages": [
{
"name": "cerdic/css-tidy",
@@ -951,28 +951,28 @@
},
{
"name": "codeception/codeception",
"version": "2.2.11",
"version": "2.3.5",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "a8681b416921ae282ccca2c485d75a3ed6756080"
"reference": "e807cd458eb9f7ae7464f33ad835a2f54aa73194"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/a8681b416921ae282ccca2c485d75a3ed6756080",
"reference": "a8681b416921ae282ccca2c485d75a3ed6756080",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/e807cd458eb9f7ae7464f33ad835a2f54aa73194",
"reference": "e807cd458eb9f7ae7464f33ad835a2f54aa73194",
"shasum": ""
},
"require": {
"behat/gherkin": "~4.4.0",
"ext-json": "*",
"ext-mbstring": "*",
"facebook/webdriver": ">=1.0.1 <2.0",
"facebook/webdriver": ">=1.1.3 <2.0",
"guzzlehttp/guzzle": ">=4.1.4 <7.0",
"guzzlehttp/psr7": "~1.0",
"php": ">=5.4.0 <8.0",
"phpunit/php-code-coverage": ">=2.2.4 <6.0",
"phpunit/phpunit": ">4.8.20 <6.0",
"phpunit/phpunit": ">4.8.20 <7.0",
"phpunit/phpunit-mock-objects": ">2.3 <5.0",
"sebastian/comparator": ">1.1 <3.0",
"sebastian/diff": "^1.4",
@@ -997,6 +997,7 @@
"php-amqplib/php-amqplib": "~2.4",
"predis/predis": "^1.0",
"squizlabs/php_codesniffer": "~2.0",
"symfony/process": ">=2.7 <4.0",
"vlucas/phpdotenv": "^2.4.0"
},
"suggest": {
@@ -1041,7 +1042,7 @@
"functional testing",
"unit testing"
],
"time": "2017-05-11T21:07:05+00:00"
"time": "2017-08-10T20:28:02+00:00"
},
{
"name": "codeception/verify",

26
tests/_support/NoGuy.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class NoGuy extends \Codeception\Actor
{
use _generated\NoGuyActions;
/**
* Define custom actions here
*/
}