Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Sep 17, 2015
1 parent b337bac commit 0ab7940
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

class FunctionalTestCase extends TestCase
{
protected function getApplicationAliases($app)
protected function getPackageAliases($app)
{
return [
'Purify' => 'Stevebauman\Purify\Facades\Purify',
];
}

protected function getApplicationProviders($app)
protected function getPackageProviders($app)
{
return [
'Stevebauman\Purify\PurifyServiceProvider',
Expand Down
11 changes: 10 additions & 1 deletion tests/PurifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
class PurifyTest extends FunctionalTestCase
{
public $testInput = '<script>alert("Harmful Script");</script> <p style="a {color: blue;}" class="a-different-class">Test</p>';


public function testClean()
{
$cleaned = Purify::clean($this->testInput);

$expected = '<p class="a-different-class">Test</p>';

$this->assertEquals($expected, $cleaned);
}

public function testCleanArray()
{
$cleaned = Purify::clean([$this->testInput, $this->testInput]);
Expand Down

0 comments on commit 0ab7940

Please sign in to comment.