assertEquals($expected, Activity::get_textfield($src, 'content')); } /** * Dataprovider for test_get_textfield. */ public static function get_textfield_provider(): array { return [ 'get content field' => [ ['content' => 'Some content'], 'Some content' ], 'get content from map' => [ ['contentMap' => ['en' => 'Some content']], ['en' => 'Some content'] ], 'get not available content' => [ ['some_field' => 'Some content'], null ] ]; } }