Revert "Add initial PresentationCounter logic"

This reverts commit 1fe63e7326.
This commit is contained in:
Oliver Davies 2025-06-10 20:47:23 +01:00
parent 8d8bf62f2c
commit b0ea499ad4
2 changed files with 0 additions and 62 deletions

View file

@ -1,13 +0,0 @@
<?php
declare(strict_types=1);
namespace Drupal\opd_presentations;
final class PresentationCounter {
public function getCount(): int {
return 1;
}
}

View file

@ -1,49 +0,0 @@
<?php
declare(strict_types=1);
namespace Drupal\opd_presentations\Kernel;
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\node\NodeInterface;
use Drupal\opd_presentations\PresentationCounter;
use Drupal\paragraphs\Entity\Paragraph;
use Drupal\paragraphs\ParagraphInterface;
class PresentationCounterTest extends EntityKernelTestBase {
use NodeCreationTrait;
protected static $modules = [
'node',
'opd_presentations',
'paragraphs',
];
public function test_count_presentation(): void {
$this->createPresentation(
events: [
Paragraph::create(['type' => 'event']),
],
);
$counter = $this->container->get(PresentationCounter::class);
$this->assertSame(
actual: $counter->getCount(),
expected: 1,
);
}
/**
* @param ParagraphInterface[] $events
*/
private function createPresentation(array $events): NodeInterface {
return $this->createNode([
'field_events' => $events,
'type' => 'presentation',
]);
}
}