Permalink
Browse files

A little test improvement

  • Loading branch information...
OtakuMegane committed Oct 14, 2018
1 parent 09904b1 commit a617a46b65078359a84cf713fe8e4aca7f417a91
Showing with 13 additions and 3 deletions.
  1. +0 −1 board_files/include/post/PostData.php
  2. +13 −2 tests/{TestOutputFilters.php → OutputFiltersTest.php}
@@ -53,7 +53,6 @@ public function processPostData($post)
$post->content_data['poster_name'] = _gettext('Anonymous');
$post->content_data['email'] = '';
}
}
public function checkEntry($post_item, $type)
@@ -1,14 +1,25 @@
<?php
require_once 'nelliel_version.php';
require_once '../board_files/include/classes/OutputFilter.php';
require_once __DIR__ . '/../board_files/include/classes/OutputFilter.php';
class TestOutputFilters extends PHPUnit_Framework_TestCase
class OutputFiltersTest extends PHPUnit_Framework_TestCase
{
function __construct()
{
}
public function testCleanAndEncode()
{
$filter = new \Nelliel\OutputFilter();
$whitespace_string = " \n\r\t ";
$untrimmed_string = " string ";
$filter->cleanAndEncode($whitespace_string);
$this->assertTrue($whitespace_string === '');
$filter->cleanAndEncode($untrimmed_string);
$this->assertTrue($untrimmed_string === 'string');
}
public function testClearWhitespace()
{
$filter = new \Nelliel\OutputFilter();

0 comments on commit a617a46

Please sign in to comment.