/** * Test if whitespace is trimmed and spaces are treated the same as tabs and nbsp * * @test * @see https://github.com/dmitryd/typo3-realurl/issues/218 */ public function convertToSafeStringWithWhitespace() { // the string should be trimmed $this->assertEquals('trim', $this->utility->convertToSafeString(" trim ")); // the next line contains a non-breaking-sapce (\x20) $this->assertEquals('non-breaking-space-split', $this->utility->convertToSafeString("non-breaking-space split"), 'Non-breaking-spaces should be treated as whitespace'); // tabs should be treated the same as white-space $this->assertEquals('tab-split', $this->utility->convertToSafeString("tab\tsplit"), 'tabs should be treated the same as white-space'); }