Commit e5dd1f5
committed
test(api): drop deprecated shims from coverage; test the null-query path
The deprecated global function shims are guarded by function_exists() checks that execute during Composer's files autoload -- before PHPUnit starts collecting coverage -- so those lines can never be covered. Wrap the back-compat block in @codeCoverageIgnore; the shim bodies are still exercised by PublicApiTest.
Also add a test for get_page_id_for_custom_post_type() called with no post type outside a PFCPT query (the query-var fallthrough). functions.php goes 78% -> 93%.1 parent 3a8c8a9 commit e5dd1f5
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| 131 | + | |
127 | 132 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
0 commit comments