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' => '' ],
]
];
}
}