use Symfony\Component\HttpFoundation\Response;
/**
* @internal
*
* @covers \Shopware\Core\System\CustomEntity\CustomEntityException
*/
class CustomEntityExceptionTest extends TestCase
{ public function testNoLabelProperty(): void
{ $exception = CustomEntityException::
noLabelProperty();
static::
assertSame(Response::HTTP_INTERNAL_SERVER_ERROR,
$exception->
getStatusCode());
static::
assertSame(CustomEntityException::CUSTOM_FIELDS_AWARE_NO_LABEL_PROPERTY,
$exception->
getErrorCode());
static::
assertSame('Entity must have a label property when it is custom field aware',
$exception->
getMessage());
} public function testLabelPropertyNotDefined(): void
{ $labelProperty = 'some_label';
$exception = CustomEntityException::
labelPropertyNotDefined($labelProperty);