Skip to content

Commit

Permalink
Dev: Throw exception at PHP notice in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Dec 27, 2017
1 parent 824ef68 commit 6f07ba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/bootstrap.php
Expand Up @@ -220,7 +220,8 @@
Yii::createApplication('LSYii_Application', $config);

set_error_handler(function($no, $msg, $file, $line, $context) {
error_log($file . ':' . $line . ': ' . $msg);
//error_log($file . ':' . $line . ': ' . $msg);
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}, E_ERROR & E_WARNING & E_PARSE);

require_once(__DIR__ . '/TestHelper.php');
Expand All @@ -231,6 +232,7 @@

define('PHP_ENV', 'test');

// TODO: Move this logic to installater test.
$configFile = __DIR__ . '/application/config/config.php';
$configBackupFile = __DIR__ . '/application/config/test-backup.config.php';

Expand Down
1 change: 1 addition & 0 deletions tests/models/TemplateConfigurationTest.php
Expand Up @@ -16,6 +16,7 @@ class TemplateConfigurationTest extends TestBaseClass
*/
public function testCopyMinimalTemplate()
{
\Yii::import('application.helpers.globalsettings_helper', true);
$tempConf = \TemplateConfiguration::getInstanceFromTemplateName('default');
$tempConf->prepareTemplateRendering('default');

Expand Down

0 comments on commit 6f07ba7

Please sign in to comment.