File manager - Edit - /var/www/html/portal/tests/Unit/LinhasDoTempoResourceTest.php
Back
<?php namespace Tests\Unit; use App\Http\Resources\Accounts\LinhasDoTempo\LinhasDoTempoResource; use Tests\TestCase; class LinhasDoTempoResourceTest extends TestCase { public function test_sanitize_process_html_remove_script_tags(): void { $resource = new LinhasDoTempoResource(); $dirty = '<p>ok</p><script>alert(1)</script><strong>x</strong>'; $clean = $resource->sanitizeProcessHtml($dirty); $this->assertStringContainsString('<p>ok</p>', $clean); $this->assertStringContainsString('<strong>x</strong>', $clean); $this->assertStringNotContainsString('<script', strtolower($clean)); } public function test_parse_tags_input_splits_and_trims(): void { $resource = new LinhasDoTempoResource(); $tags = $resource->parseTagsInput(' a , b ; c '); $this->assertSame(['a', 'b', 'c'], $tags); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings