setupFile = dirname( __FILE__ ) . '/../../PortableInfobox.setup.php'; $this->sanitizer = SanitizerBuilder::createFromType('hero-mobile'); parent::setUp(); } /** * @param $data * @param $expected * @dataProvider testSanitizeDataProvider */ function testSanitize( $data, $expected ) { $this->assertEquals( $expected, $this->sanitizer->sanitize( $data ) ); } function testSanitizeDataProvider() { return [ [ ['title' => ['value' => 'Test Title'] ], ['title' => ['value' => 'Test Title'] ] ], [ ['title' => ['value' => 'Real world DBGT Logotitle example'] ] , ['title' => ['value' => 'Real world title example'] ] ], ]; } }