reviewer-1.2.x-dev/modules/reviewer_test_kit/tests/src/Kernel/Entity/EntityTaskBaseTest.php
modules/reviewer_test_kit/tests/src/Kernel/Entity/EntityTaskBaseTest.php
<?php
declare(strict_types=1);
namespace Drupal\Tests\reviewer_test_kit\Kernel\Entity;
use Drupal\reviewer\Reviewer\Action;
use Drupal\reviewer_test_kit\Plugin\reviewer\Task\Entity\EntityTypeTaskBase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
/**
* Test that the entity task base methods give the correct values.
*/
#[Group('Reviewer')]
#[CoversClass(EntityTypeTaskBase::class)]
final class EntityTaskBaseTest extends EntityTaskBaseTestBase {
/**
* Check that an exception is thrown when testing reviews with no entity type.
*
* @throws \Exception
* @throws \PHPUnit\Framework\ExpectationFailedException
* @throws \PHPUnit\Framework\UnknownClassOrInterfaceException
*/
public function testNoEntityType(): void {
$result = $this->runOneTaskReviewAndGetResult(Action::Check, 'test_no_entity_type_review');
self::assertSame('Entity type not defined.', $result->getMessage());
}
}
