PHP Classes

File: tests/Formats/PlainFormatTest.php

Recommend this page to a friend!
  Classes of Rodolfo Berrios Arce   Var-Dump   tests/Formats/PlainFormatTest.php   Download  
File: tests/Formats/PlainFormatTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Var-Dump
Show the value of a variable in colored way
Author: By
Last change:
Date: 1 month ago
Size: 1,677 bytes
 

Contents

Class file image Download
<?php

/*
 * This file is part of Chevere.
 *
 * (c) Rodolfo Berrios <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace
Chevere\Tests\Formats;

use
Chevere\VarDump\Formats\PlainFormat;
use
Chevere\VarDump\Interfaces\HighlightInterface;
use
PHPUnit\Framework\TestCase;

final class
PlainFormatTest extends TestCase
{
    public function
testIndent(): void
   
{
       
$indent = 5;
       
$indented = (new PlainFormat())->indent($indent);
       
$this->assertSame($indent, strlen($indented));
    }

    public function
testEmphasis(): void
   
{
       
$string = 'string';
       
$emphasized = (new PlainFormat())->emphasis($string);
       
$this->assertSame($string, $emphasized);
    }

    public function
testFilterEncodedChars(): void
   
{
       
$string = 'string</a>';
       
$filtered = (new PlainFormat())->filterEncodedChars($string);
       
$this->assertSame($string, $filtered);
    }

    public function
testHighlight(): void
   
{
       
$string = 'string';
       
$highlighted = (new PlainFormat())->highlight(HighlightInterface::KEYS[0], $string);
       
$this->assertSame($string, $highlighted);
    }

    public function
testDetails(): void
   
{
       
$this->assertSame('', (new PlainFormat())->detailsOpen());
       
$this->assertSame('', (new PlainFormat())->detailsOpen(true));
       
$this->assertSame('', (new PlainFormat())->detailsOpen(false));
       
$this->assertSame('', (new PlainFormat())->detailsClose());
       
$this->assertSame('', (new PlainFormat())->detailsPullUp());
    }
}