Skip to content

Commit

Permalink
[TASK] Make TaskTest notice free
Browse files Browse the repository at this point in the history
Resolves: #84426
Releases: master
Change-Id: I2de52b5ddaacdfb9f8e29a11009ef7db3d9e1c46
Reviewed-on: https://review.typo3.org/56297
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lsascha authored and lolli42 committed Mar 17, 2018
1 parent e5030d4 commit 4a6fa2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion typo3/sysext/extbase/Classes/Scheduler/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function getAdditionalInformation()
if (!empty($this->arguments)) {
$arguments = [];
foreach ($this->arguments as $argumentName => $argumentValue) {
if ($argumentValue != $this->defaults[$argumentName]) {
if (!isset($this->defaults[$argumentName]) || $argumentValue != $this->defaults[$argumentName]) {
$arguments[] = $argumentName . '=' . $argumentValue;
}
}
Expand Down
16 changes: 8 additions & 8 deletions typo3/sysext/extbase/Tests/Unit/Scheduler/TaskTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types = 1);
namespace TYPO3\CMS\Extbase\Tests\Unit\Scheduler;

/*
Expand All @@ -14,16 +15,15 @@
* The TYPO3 project - inspiring people to share!
*/

use TYPO3\CMS\Extbase\Scheduler\Task;
use TYPO3\CMS\Extbase\Scheduler\TaskExecutor;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

/**
* Test case
*/
class TaskTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
class TaskTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;

/**
* @var \TYPO3\CMS\Extbase\Scheduler\Task|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
*/
Expand All @@ -36,11 +36,11 @@ class TaskTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase

protected function setUp()
{
$this->taskExecutor = $this->getMockBuilder(\TYPO3\CMS\Extbase\Scheduler\TaskExecutor::class)
$this->taskExecutor = $this->getMockBuilder(TaskExecutor::class)
->setMethods(['execute'])
->disableOriginalConstructor()
->getMock();
$this->task = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Scheduler\Task::class, ['logException', '__wakeup'], [], '', false);
$this->task = $this->getAccessibleMock(Task::class, ['logException', '__wakeup'], [], '', false);
}

/**
Expand Down

0 comments on commit 4a6fa2a

Please sign in to comment.