build(deps): remove discoverable_entity_bundle_classes
As this module is no longer supported, remove it from the codebase and update all references to it within the custom code - instead manually wrapping nodes with the `Post` or `Talk` class, or returning it from a Repository. Fixes: #465
This commit is contained in:
parent
41e13fe078
commit
cae2091436
24 changed files with 214 additions and 150 deletions
|
@ -16,9 +16,6 @@ final class PostTest extends EntityKernelTestBase {
|
|||
'link',
|
||||
'taxonomy',
|
||||
|
||||
// Contrib.
|
||||
'discoverable_entity_bundle_classes',
|
||||
|
||||
// Custom.
|
||||
'opdavies_blog',
|
||||
'opdavies_blog_test',
|
||||
|
|
|
@ -18,7 +18,6 @@ abstract class PostTestBase extends EntityKernelTestBase {
|
|||
'link',
|
||||
|
||||
// Contrib.
|
||||
'discoverable_entity_bundle_classes',
|
||||
'hook_event_dispatcher',
|
||||
'core_event_dispatcher',
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@ namespace Drupal\Tests\opdavies_blog\Kernel;
|
|||
|
||||
use Drupal\Core\Queue\QueueInterface;
|
||||
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
|
||||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
use Drupal\Tests\node\Traits\NodeCreationTrait;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
|
||||
final class PushToSocialMediaTest extends EntityKernelTestBase {
|
||||
|
||||
|
@ -20,7 +21,6 @@ final class PushToSocialMediaTest extends EntityKernelTestBase {
|
|||
'link',
|
||||
|
||||
// Contrib.
|
||||
'discoverable_entity_bundle_classes',
|
||||
'hook_event_dispatcher',
|
||||
'core_event_dispatcher',
|
||||
|
||||
|
@ -48,8 +48,8 @@ final class PushToSocialMediaTest extends EntityKernelTestBase {
|
|||
$post = $item->data['post'];
|
||||
|
||||
$this->assertNotNull($post);
|
||||
$this->assertInstanceOf(Post::class, $post);
|
||||
$this->assertSame('1', $post->id());
|
||||
$this->assertInstanceOf(NodeInterface::class, $post);
|
||||
$this->assertSame('post', $post->bundle());
|
||||
$this->assertSame('Ignoring PHPCS sniffs within PHPUnit tests', $post->getTitle());
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
namespace Drupal\Tests\opdavies_blog\Kernel;
|
||||
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
use Drupal\taxonomy\Entity\Vocabulary;
|
||||
use Drupal\taxonomy\TermInterface;
|
||||
|
@ -26,8 +27,8 @@ final class ReorderBlogTagsTest extends PostTestBase {
|
|||
Post::FIELD_TAGS => [3, 1, 2],
|
||||
]);
|
||||
|
||||
/** @var Post $post */
|
||||
$post = Node::load($post->id());
|
||||
$node = Node::load($post->id());
|
||||
$post = Post::createFromNode($node);
|
||||
|
||||
$this->assertSame(
|
||||
['Drupal', 'PHP', 'Symfony'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue