You are here

public function NoNbspUnitTestCase::testFunctionNoNbspEraser in No Non-breaking Space Filter 7

Test the function _no_nbsp_eraser.

File

./no_nbsp.test, line 299
Tests for the no_nbsp.module.

Class

NoNbspUnitTestCase
Unit tests.

Code

public function testFunctionNoNbspEraser() {
  $this
    ->assertEqual(_no_nbsp_eraser('l o l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l  o  l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l  o  l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l   o   l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l  o  l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l  o  l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l o l'), 'l o l');
  $this
    ->assertEqual(_no_nbsp_eraser('l&nbspol'), 'l&nbspol');
  $this
    ->assertEqual(_no_nbsp_eraser(' '), ' ');
  $this
    ->assertEqual(_no_nbsp_eraser(' '), ' ');
  $this
    ->assertEqual(_no_nbsp_eraser('   '), ' ');
  $this
    ->assertEqual(_no_nbsp_eraser(' '), ' ');
}