/** * @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); }
/** * Shortcut to \Pressbooks\Sanitize\strip_br(); * * @param $val * * @return string */ function pb_strip_br($val) { return \Pressbooks\Sanitize\strip_br($val); }