Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
31
vendor/doctrine/rst-parser/tests/ErrorManagerTest.php
vendored
Normal file
31
vendor/doctrine/rst-parser/tests/ErrorManagerTest.php
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?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);
|
||||
$configuration->expects(self::atLeastOnce())
|
||||
->method('isSilentOnError')
|
||||
->willReturn(true);
|
||||
|
||||
$errorManager = new ErrorManager($configuration);
|
||||
$errorManager->error('ERROR FOO');
|
||||
$errorManager->error('ERROR BAR');
|
||||
|
||||
$errors = $errorManager->getErrors();
|
||||
self::assertSame('ERROR FOO', $errors[0]->asString());
|
||||
self::assertSame('ERROR BAR', $errors[1]->asString());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue