setupFile = dirname( __FILE__ ) . '/../../PortableInfobox.setup.php'; $this->sanitizer = SanitizerBuilder::createFromType('image'); parent::setUp(); } /** * @param $data * @param $expected * @dataProvider testSanitizeDataProvider */ function testSanitize( $data, $expected ) { $this->assertEquals( $expected, $this->sanitizer->sanitize( $data ) ); } function testSanitizeDataProvider() { return [ [ [ 'caption' => 'Test Title with small tag, span tag and tag' ], [ 'caption' => 'Test Title with small tag, span tag and tag' ] ], [ [ 'caption' => '' ], [ 'caption' => '' ], ], [ [ 'caption' => ' 01:00 AMERICA'S TEST KITCHEN SEASON 9 ' ], [ 'caption' => 'AMERICA'S TEST KITCHEN SEASON 9' ] ], [ [ 'caption' => '[1]' ], [ 'caption' => '[1]' ] ], [ [ 'caption' => '' ], [ 'caption' => '' ] ] ]; } }
AMERICA'S TEST KITCHEN SEASON 9