gl-website-deployer/vendor/doctrine/rst-parser/tests/Builder/ParseQueueTest.php

28 lines
916 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
declare(strict_types=1);
namespace Doctrine\Tests\RST\Builder;
use Doctrine\RST\Builder\ParseQueue;
use PHPUnit\Framework\TestCase;
class ParseQueueTest extends TestCase
{
public function testAddingFiles(): void
{
$parseQueue = new ParseQueue();
$parseQueue->addFile('file_needs_parsing1', true);
$parseQueue->addFile('file_no_parsing1', false);
self::assertTrue($parseQueue->isFileKnownToParseQueue('file_needs_parsing1'));
self::assertTrue($parseQueue->isFileKnownToParseQueue('file_no_parsing1'));
self::assertFalse($parseQueue->isFileKnownToParseQueue('other_file'));
self::assertTrue($parseQueue->doesFileRequireParsing('file_needs_parsing1'));
self::assertFalse($parseQueue->doesFileRequireParsing('file_no_parsing1'));
self::assertSame(['file_needs_parsing1'], $parseQueue->getAllFilesThatRequireParsing());
}
}