Check data factories with PHPStan, fix discovered problems
[MAILPOET-2429]
This commit is contained in:
committed by
Jack Kitterhing
parent
eb02627a98
commit
ffc11af689
@@ -476,7 +476,12 @@ class RoboFile extends \Robo\Tasks {
|
||||
// tests
|
||||
->taskExec($task)
|
||||
->rawArg('--configuration=phpstan-tests.neon')
|
||||
->arg("$dir/tests/unit")
|
||||
->rawArg(
|
||||
implode(' ', [
|
||||
"$dir/tests/DataFactories",
|
||||
"$dir/tests/unit",
|
||||
])
|
||||
)
|
||||
->dir(__DIR__ . '/tasks/phpstan')
|
||||
|
||||
->taskExec('cd ' . __DIR__ . ' && ./tools/vendor/composer.phar install')
|
||||
|
@@ -8,6 +8,7 @@ parameters:
|
||||
- %mailpoetDir%/vendor/codeception/verify/src/Codeception/function.php
|
||||
- %mailpoetDir%/vendor/codeception/verify/src/Codeception/Verify.php
|
||||
autoload_directories:
|
||||
- %mailpoetDir%/tests/_support
|
||||
- %mailpoetDir%/tests/unit
|
||||
dynamicConstantNames:
|
||||
- WP_DEBUG
|
||||
|
@@ -20,6 +20,9 @@ class Newsletter {
|
||||
/** @var array */
|
||||
private $segments;
|
||||
|
||||
/** @var array */
|
||||
private $queue_options;
|
||||
|
||||
/** @var array */
|
||||
private $task_subscribers;
|
||||
|
||||
|
@@ -98,7 +98,7 @@ class WooCommerceProduct {
|
||||
$ids = array_map(function($id){
|
||||
return ['id' => $id];
|
||||
}, $ids);
|
||||
return $this->update('tagIds', $id);
|
||||
return $this->update('tagIds', $ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user