/** * Shortcut to \PressBooks\Sanitize\strip_br(); * * @param $val * * @return string */ function pb_strip_br($val) { return \PressBooks\Sanitize\strip_br($val); }
/** * @covers \PressBooks\Sanitize\strip_br */ public function test_strip_br() { $test = 'Hello <br /> World!'; $test = \PressBooks\Sanitize\strip_br($test); $this->assertEquals('Hello World!', $test); $test = 'Hello <br/><br /> World!'; $test = \PressBooks\Sanitize\strip_br($test); $this->assertEquals('Hello World!', $test); $test = 'Hello <br /> World!'; $test = \PressBooks\Sanitize\strip_br($test); $this->assertEquals('Hello World!', $test); $test = 'Hello <br/><br /> World!'; $test = \PressBooks\Sanitize\strip_br($test); $this->assertEquals('Hello World!', $test); }