Another attempt to fix a failed unit test in WP 4.9
Another attempt to fix a failed unit test in WP 4.9

Manually set $GLOBALS['wp_query']->is_singular
to true.
Still, this isn't an ideal solution.

ampproject/amp-toolbox-php,ampproject/amp-toolbox-php