-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from weaverryan/track-error-manager-errors
Keep track of ErrorManager errors
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\Tests\RST; | ||
|
||
use Doctrine\RST\Configuration; | ||
use Doctrine\RST\ErrorManager; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ErrorManagerTest extends TestCase | ||
{ | ||
public function testGetErrors() : void | ||
{ | ||
$configuration = $this->createMock(Configuration::class); | ||
$configuration->expects(self::atLeastOnce()) | ||
->method('isAbortOnError') | ||
->willReturn(false); | ||
|
||
$errorManager = new ErrorManager($configuration); | ||
$errorManager->error('ERROR FOO'); | ||
$errorManager->error('ERROR BAR'); | ||
self::assertSame(['ERROR FOO', 'ERROR BAR'], $errorManager->getErrors()); | ||
} | ||
} |