TableSectionTest.php 821 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of the league/commonmark package.
  5. *
  6. * (c) Colin O'Dell <colinodell@gmail.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace League\CommonMark\Tests\Unit\Extension\Table;
  12. use League\CommonMark\Extension\Table\TableSection;
  13. use PHPUnit\Framework\TestCase;
  14. final class TableSectionTest extends TestCase
  15. {
  16. public function testIsHeadAndIsBody(): void
  17. {
  18. $head = new TableSection(TableSection::TYPE_HEAD);
  19. $this->assertTrue($head->isHead());
  20. $this->assertFalse($head->isBody());
  21. $body = new TableSection(TableSection::TYPE_BODY);
  22. $this->assertFalse($body->isHead());
  23. $this->assertTrue($body->isBody());
  24. }
  25. }