setupFile = dirname( __FILE__ ) . '/../../PortableInfobox.setup.php'; $this->sanitizer = SanitizerBuilder::createFromType('horizontal-group-content'); parent::setUp(); } /** * @param $data * @param $expected * @dataProvider testSanitizeDataProvider */ function testSanitize( $data, $expected ) { $this->assertEquals( $expected, $this->sanitizer->sanitize( $data ) ); } function testSanitizeDataProvider() { return [ [ [ 'labels' => [ 0 => '', 1 => 'Label with link', 2 => 'Label with link', 3 => 'Money ' ], 'values' => [ 0 => 'Data Value', 1 => 'Data Value', 2 => '', 3 => '$50' ] ], [ 'labels' => [ 0 => '', 1 => 'Label with link', 2 => 'Label with link', 3 => 'Money', ], 'values' => [ 0 => 'Data Value', 1 => 'Data Value', 2 => '', 3 => '$50' ] ] ] ]; } }