Skip to content

Commit

Permalink
test 1 of 3
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana authored Aug 21, 2024
1 parent 425d871 commit 2d246bf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/Integrate/Bootstrap/HandleProvidersTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

namespace System\Integrate\Bootstrap;

use PHPUnit\Framework\TestCase;
use System\Integrate\Application;

class HandleProvidersTest extends TestCase
{
/**
* @test
*/
public function itCanHandleException()
{
$app = new Application(dirname(__DIR__) . '/assets/app2');
$app->set('environment', 'testing');

$handle = new HandleProviders();
$handle->bootstrap($app);

$this->expectException(\ErrorException::class);
$this->expectExceptionMessage(__CLASS__);
$handle->handleError(E_ERROR, __CLASS__, __FILE__, __LINE__);

$app->flush();
}
}

0 comments on commit 2d246bf

Please sign in to comment.