<?php use Cake\Core\Configure; use CvoTechnologies\Notifier\Notification; Notification::configTransport(Configure::consume('NotificationTransport')); Notification::config(Configure::consume('Notification'));
/** * test that default profile is used by constructor if available. * * @return void */ public function testDefaultProfile() { $config = ['test' => 'ok', 'test2' => true]; Configure::write('Notification.default', $config); Notification::config(Configure::consume('Notification')); $Notification = new Notification(); $this->assertSame($Notification->profile(), $config); Configure::delete('Notification'); Notification::drop('default'); }