MockHeaderSubscriber.php in Akamai 8.3
File
tests/src/Kernel/MockHeaderSubscriber.php
View source
<?php
namespace Drupal\Tests\akamai\Kernel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\akamai\Event\AkamaiHeaderEvents;
class MockHeaderSubscriber implements EventSubscriberInterface {
public static function getSubscribedEvents() {
$events[AkamaiHeaderEvents::HEADER_CREATION][] = [
'onHeaderCreation',
];
return $events;
}
public function onHeaderCreation(AkamaiHeaderEvents $event) {
$event->data[] = 'helloworld';
}
}