Commit d60bb21
committed
test: add DialectAbstract edge case coverage tests
Added comprehensive edge case tests to reach 90%+ coverage:
SharedCoverageTest (+3 tests):
- testQuoteTableWithAliasUsingAS() - table alias with AS keyword
- testNormalizeJsonPathWithEmptyString() - empty JSON path handling
- testFormatDefaultValueWithNumbers() - numeric default values
PdoDbSqliteTest (expanded buildLoadCsvSql):
- NULL/empty values in CSV (treated as empty strings)
- CSV with more columns than expected (truncation)
- CSV with less columns than expected (padding with NULL)
- Empty CSV file (returns empty SQL)
- CSV with only blank lines (returns empty SQL)
- Unreadable file exception
PdoDbSqliteTest (expanded buildLoadXML):
- XML with attributes (id="1" name="Alice")
- XML with empty elements (<name></name>)
- Empty XML file (returns empty SQL)
- Unreadable file exception
Coverage improvements:
- DialectAbstract::quoteTableWithAlias() AS branch
- DialectAbstract::normalizeJsonPath() empty path handling
- DialectAbstract::formatDefaultValue() non-string values
- DialectAbstract::buildLoadCsvSql() all edge cases (NULL, empty, batching, validation)
- DialectAbstract::buildLoadXML() all edge cases (empty, attributes, validation)
Tests: 326 total, 1491 assertions, all passing ✅
Expected coverage increase: 83% → 90%+1 parent 96db604 commit d60bb21
2 files changed
Lines changed: 144 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2792 | 2792 | | |
2793 | 2793 | | |
2794 | 2794 | | |
2795 | | - | |
| 2795 | + | |
2796 | 2796 | | |
2797 | 2797 | | |
2798 | 2798 | | |
2799 | | - | |
2800 | 2799 | | |
2801 | 2800 | | |
2802 | 2801 | | |
2803 | | - | |
2804 | 2802 | | |
2805 | 2803 | | |
2806 | 2804 | | |
2807 | | - | |
| 2805 | + | |
2808 | 2806 | | |
2809 | 2807 | | |
2810 | 2808 | | |
| |||
2816 | 2814 | | |
2817 | 2815 | | |
2818 | 2816 | | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
2819 | 2869 | | |
2820 | 2870 | | |
2821 | 2871 | | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
2822 | 2877 | | |
2823 | 2878 | | |
2824 | 2879 | | |
2825 | 2880 | | |
2826 | 2881 | | |
2827 | 2882 | | |
2828 | | - | |
| 2883 | + | |
2829 | 2884 | | |
2830 | 2885 | | |
2831 | 2886 | | |
2832 | | - | |
2833 | 2887 | | |
2834 | 2888 | | |
2835 | 2889 | | |
2836 | 2890 | | |
2837 | 2891 | | |
2838 | 2892 | | |
2839 | | - | |
2840 | 2893 | | |
2841 | 2894 | | |
2842 | 2895 | | |
2843 | | - | |
2844 | | - | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
2845 | 2938 | | |
2846 | 2939 | | |
2847 | 2940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
897 | 939 | | |
898 | 940 | | |
899 | 941 | | |
| |||
0 commit comments