This commit is contained in:
2020-10-06 14:27:47 +07:00
commit 586be80cf6
16613 changed files with 3274099 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
use Codeception\Event\SuiteEvent;
use Codeception\Lib\Notification;
use Codeception\Subscriber\ErrorHandler;
use Codeception\Suite;
class ErrorHandlerTest extends \PHPUnit\Framework\TestCase
{
public function testDeprecationMessagesRespectErrorLevelSetting()
{
$errorHandler = new ErrorHandler();
$suiteEvent = new SuiteEvent(new Suite(), null, ['error_level' => 'E_ERROR']);
$errorHandler->handle($suiteEvent);
//Satisfying The Premature Exit Handling
$errorHandler->onFinish($suiteEvent);
Notification::all(); //clear the messages
$errorHandler->errorHandler(E_USER_DEPRECATED, 'deprecated message', __FILE__, __LINE__, []);
$this->assertEquals([], Notification::all(), 'Deprecation message was added to notifications');
}
}