tests working with emails alsog
This commit is contained in:
@@ -7,6 +7,9 @@ use Cake\Core\Configure;
|
||||
use Cake\Core\Plugin;
|
||||
use Cake\Database\Connection;
|
||||
use Cake\Datasource\ConnectionManager;
|
||||
use Cake\Mailer\Mailer;
|
||||
use Cake\Mailer\Transport\DebugTransport;
|
||||
use Cake\Mailer\TransportFactory;
|
||||
use Cake\TestSuite\Fixture\SchemaLoader;
|
||||
use CakeContactUs\CakeContactUsPlugin;
|
||||
use Migrations\TestSuite\Migrator;
|
||||
@@ -66,7 +69,34 @@ Configure::write('ContactUs', [
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
Configure::write('EmailTransport', [
|
||||
'default' => [
|
||||
'className' => DebugTransport::class,
|
||||
]
|
||||
]);
|
||||
TransportFactory::setConfig('default', [
|
||||
'className' => DebugTransport::class,
|
||||
]);
|
||||
Configure::write('Email', [
|
||||
/*
|
||||
* Email delivery profiles
|
||||
*
|
||||
* Delivery profiles allow you to predefine various properties about email
|
||||
* messages from your application and give the settings a name. This saves
|
||||
* duplication across your application and makes maintenance and development
|
||||
* easier. Each profile accepts a number of keys. See `Cake\Mailer\Email`
|
||||
* for more information.
|
||||
*/
|
||||
'default' => [
|
||||
'transport' => 'default',
|
||||
'from' => 'test@example.com',
|
||||
/*
|
||||
* Will by default be set to config value of App.encoding, if that exists otherwise to UTF-8.
|
||||
*/
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
],
|
||||
]);
|
||||
$cache = [
|
||||
'default' => [
|
||||
'engine' => 'File',
|
||||
@@ -89,6 +119,7 @@ $cache = [
|
||||
];
|
||||
|
||||
Cache::setConfig($cache);
|
||||
Mailer::setConfig(Configure::consume('Email'));
|
||||
|
||||
class_alias(AppController::class, 'App\Controller\AppController');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user