magallanes/tests/Task/TestCaseFailTask.php

33 lines
712 B
PHP
Raw Normal View History

2017-01-01 22:20:43 +01:00
<?php
/*
* This file is part of the Magallanes package.
*
* (c) Andrés Montañez <andres@andresmontanez.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mage\Tests\Task;
2017-01-07 05:53:57 +01:00
use Mage\Task\Exception\ErrorException;
2017-01-01 22:20:43 +01:00
use Mage\Task\AbstractTask;
class TestCaseFailTask extends AbstractTask
{
2022-04-10 06:20:03 +02:00
public function getName(): string
2017-01-01 22:20:43 +01:00
{
return 'test-fail';
}
2022-04-10 06:20:03 +02:00
public function getDescription(): string
2017-01-01 22:20:43 +01:00
{
return '[Test] This is a Test Task which Fails';
}
2022-04-10 06:20:03 +02:00
public function execute(): bool
2017-01-01 22:20:43 +01:00
{
throw new ErrorException('This is a text with a lot of characters');
}
}