/** * @covers ::createField */ public function testCreateFieldIdealEmbedCode() { $wrapper = new FormstackApi(ACCESS_TOKEN); $attributes = array('text' => '<script type="text/javascript">alert(\'Woop there it is \');</script>'); $field = $wrapper->createField(CREATE_FIELD_FORM_ID, 'embed', '', false, '', false, $attributes); $this->assertEquals($field->type, 'embed'); }