diff --git a/src/parser_yin.c b/src/parser_yin.c
index 7d406f5..e7e600c 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -26,14 +26,6 @@
 #include "tree_schema_internal.h"
 #include "parser_yin.h"
 
-/**
- * @brief Match argument name.
- *
- * @param[in] name String representing name.
- * @param[in] len Lenght of the name.
- *
- * @reurn YIN_ARGUMENT value.
- */
 enum YIN_ARGUMENT
 match_argument_name(const char *name, size_t len)
 {
diff --git a/tests/src/test_parser_yin.c b/tests/src/test_parser_yin.c
index de3e1d4..996ecb3 100644
--- a/tests/src/test_parser_yin.c
+++ b/tests/src/test_parser_yin.c
@@ -10,10 +10,12 @@
 #include "../../src/tree_schema.h"
 #include "../../src/tree_schema_internal.h"
 #include "../../src/parser_yin.h"
+#include "../../src/xml.h"
 
 struct state {
     struct ly_ctx *ctx;
     struct lys_module *mod;
+    struct lyxml_context *xml_ctx;
 };
 
 static int
@@ -35,6 +37,10 @@
     st->mod = calloc(1, sizeof(*st->mod));
     st->mod->ctx = st->ctx;
 
+    st->xml_ctx = calloc(1, sizeof(struct lys_parser_ctx));
+    st->xml_ctx->ctx = st->ctx;
+    st->xml_ctx->line = 1;
+
     return EXIT_SUCCESS;
 }
 
@@ -43,8 +49,10 @@
 {
     struct state *st = *(struct state **)state;
 
+    lyxml_context_clear(st->xml_ctx);
     lys_module_free(st->mod, NULL);
     ly_ctx_destroy(st->ctx, NULL);
+    free(st->xml_ctx);
     free(st);
 
     return EXIT_SUCCESS;
@@ -188,6 +196,33 @@
     assert_string_equal(st->mod->parsed->mod->ref, "reference...");
 }
 
+static void
+test_parse_text_element(void **state)
+{
+    struct state *st = *state;
+    const char *res = NULL, *prefix = NULL, *name = NULL;
+    size_t prefix_len = 0, name_len = 0;
+    LY_ERR ret = LY_SUCCESS;
+
+    const char *data = "<elem>content</elem>";
+    lyxml_get_element(st->xml_ctx, &data, &prefix, &prefix_len, &name, &name_len);
+    parse_text_element(st->xml_ctx, &data, &res);
+    assert_string_equal(res, "content");
+    lydict_remove(st->ctx, "content");
+
+
+    data = "<elem xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">another-content</elem>";
+    lyxml_get_element(st->xml_ctx, &data, &prefix, &prefix_len, &name, &name_len);
+    parse_text_element(st->xml_ctx, &data, &res);
+    assert_string_equal(res, "another-content");
+    lydict_remove(st->ctx, "another-content");
+
+    data = "<elem invalid=\"invalid\">text</elem>";
+    lyxml_get_element(st->xml_ctx, &data, &prefix, &prefix_len, &name, &name_len);
+    ret = parse_text_element(st->xml_ctx, &data, &res);
+    assert_int_equal(ret, LY_EVALID);
+}
+
 int
 main(void)
 {
@@ -195,6 +230,7 @@
     const struct CMUnitTest tests[] = {
         cmocka_unit_test_setup_teardown(test_parse, setup_f, teardown_f),
         cmocka_unit_test_setup_teardown(test_meta, setup_f, teardown_f),
+        cmocka_unit_test_setup_teardown(test_parse_text_element, setup_f, teardown_f),
         cmocka_unit_test(test_match_keyword),
         cmocka_unit_test(test_match_argument),
     };
