Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from punktDe/scheduler-test-task-remove-t3lib-…
Browse files Browse the repository at this point in the history
…flashm

TASK: Replace t3lib_FlashMessage by FlashMessage
  • Loading branch information
daniellienert authored Feb 25, 2019
2 parents 482b8cc + 11bf9f5 commit c4aabe6
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions Tests/Functional/Scheduler/TestTask.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
<?php

namespace PunktDe\PtExtbase\Tests\Functional\Scheduler;

/***************************************************************
* Copyright (C) 2015 punkt.de GmbH
* Authors: el_equipo <[email protected]>
*
* This script is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
/*
* This file is part of the PunktDe\PtExtbase package.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

* This package is open source software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/

use PunktDe\PtExtbase\Scheduler\AbstractSchedulerTask;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use \TYPO3\CMS\Core\Messaging\FlashMessage;
use \TYPO3\CMS\Core\Messaging\FlashMessageQueue;
Expand Down Expand Up @@ -52,12 +37,12 @@ public function execute()
{
try {
$flashMessage = GeneralUtility::makeInstance(
't3lib_FlashMessage',
FlashMessage::class,
'This Task is created for testing purposes, it creates some test files and log entries in the application log',
'',
FlashMessage::WARNING,
true
);
); /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
FlashMessageQueue::addMessage($flashMessage);
$executeTestFilePath = Files::concatenatePaths([$this->testPath, 'testTaskExecution.txt']);
file_put_contents($executeTestFilePath, '1428924570');
Expand Down

0 comments on commit c4aabe6

Please sign in to comment.