Fix blog tag re-ordering test
Add a NullPostPusher implementation and use it within the tag re-ordering tests to stop an Exception being thrown because there's no webhook URL. References #332
This commit is contained in:
parent
d7459ff30f
commit
87ee87f915
|
@ -14,5 +14,8 @@ services:
|
||||||
Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher:
|
Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher:
|
||||||
autowire: true
|
autowire: true
|
||||||
|
|
||||||
|
Drupal\opdavies_blog\Service\PostPusher\NullPostPusher:
|
||||||
|
autowire: true
|
||||||
|
|
||||||
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
|
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
|
||||||
alias: Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher
|
alias: Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Drupal\opdavies_blog\Service\PostPusher;
|
||||||
|
|
||||||
|
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||||
|
|
||||||
|
final class NullPostPusher implements PostPusher {
|
||||||
|
|
||||||
|
public function push(Post $post): void {}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
services:
|
||||||
|
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
|
||||||
|
alias: Drupal\opdavies_blog\Service\PostPusher\NullPostPusher
|
|
@ -30,8 +30,8 @@ final class ReorderBlogTagsTest extends EntityKernelTestBase {
|
||||||
'core_event_dispatcher',
|
'core_event_dispatcher',
|
||||||
|
|
||||||
// Custom.
|
// Custom.
|
||||||
'opdavies_blog_test',
|
|
||||||
'opdavies_blog',
|
'opdavies_blog',
|
||||||
|
'opdavies_blog_test',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
|
@ -67,6 +67,8 @@ final class ReorderBlogTagsTest extends EntityKernelTestBase {
|
||||||
'opdavies_blog_test',
|
'opdavies_blog_test',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->installSchema('node', ['node_access']);
|
||||||
|
|
||||||
$this->installEntitySchema('taxonomy_vocabulary');
|
$this->installEntitySchema('taxonomy_vocabulary');
|
||||||
$this->installEntitySchema('taxonomy_term');
|
$this->installEntitySchema('taxonomy_term');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue