mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add PurifierTest
This commit is contained in:
parent
8f28cb3fb4
commit
847e7b7fa4
1 changed files with 23 additions and 0 deletions
23
tests/Unit/PurifierTest.php
Normal file
23
tests/Unit/PurifierTest.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Unit;
|
||||||
|
|
||||||
|
use Purify;
|
||||||
|
use Tests\TestCase;
|
||||||
|
use Illuminate\Foundation\Testing\WithFaker;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
|
||||||
|
class PurifierTest extends TestCase
|
||||||
|
{
|
||||||
|
/** @test */
|
||||||
|
public function puckTest()
|
||||||
|
{
|
||||||
|
$actual = Purify::clean("<span class=\"fa-spin fa\">catgirl spinning around in the interblag</span>");
|
||||||
|
$expected = 'catgirl spinning around in the interblag';
|
||||||
|
$this->assertEquals($expected, $actual);
|
||||||
|
|
||||||
|
$actual = Purify::clean("<p class=\"fa-spin fa\">catgirl spinning around in the interblag</p>");
|
||||||
|
$expected = '<p>catgirl spinning around in the interblag</p>';
|
||||||
|
$this->assertEquals($expected, $actual);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue