richard
/
cyca
Archived
1
0
Fork 0
This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues/pull-requests.
cyca/tests/Feature/CleanerTest.php

41 lines
1.0 KiB
PHP
Executable File

<?php
namespace Tests\Feature;
use Tests\TestCase;
/**
* @internal
* @coversNothing
*/
class CleanerTest extends TestCase
{
public function testPlainTextStringDefaultParams()
{
$sourceString = 'hello world';
$expectedString = 'hello world';
$this->assertSame($expectedString, \App\Helpers\Cleaner::cleanupString($sourceString));
}
public function testPlainTextStringRemoveExtraSpaces()
{
$sourceString = ' hello world ';
$expectedString = 'hello world';
$this->assertSame($expectedString, \App\Helpers\Cleaner::cleanupString($sourceString, true, true));
}
public function testStripTags()
{
$sourceString = '<script type="text/javascript">hello <span>world</span></script>';
$expectedString = 'hello world';
$this->assertSame($expectedString, \App\Helpers\Cleaner::cleanupString($sourceString, true, true));
}
public function testHtmlStringDefaultParams()
{
}
}