Files
piratepoet/mailpoet/tests/integration/Entities/WpPostEntityTest.php
Rostislav Wolny 4734aafef5 Mark WpPostEntity as read-only
Read-only was added to prevent using the entity for modifying post
data.
We want to allow modifying posts only via WP functions so that we don't skip any hooks etc.
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00

12 lines
358 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Entities;
class WpPostEntityTest extends \MailPoetTest {
public function testItIsReadOnlyAndCanNotBeInstantiated() {
$this->expectException(\MailPoet\RuntimeException::class);
$this->expectExceptionMessage('WpPostEntity is read only and cannot be instantiated.');
new WpPostEntity();
}
}