| | 29 | |
| | 30 | /** |
| | 31 | * @ticket |
| | 32 | */ |
| | 33 | public function test_should_return_null_when_depth_less_than_max_depth_and_comment_null_and_no_current_global_comment() { |
| | 34 | |
| | 35 | $args = array( |
| | 36 | 'depth' => 1, |
| | 37 | 'max_depth' => 2, |
| | 38 | ); |
| | 39 | |
| | 40 | $comment = null; |
| | 41 | |
| | 42 | // store current global comment |
| | 43 | $tmp = $GLOBALS['comment']; |
| | 44 | |
| | 45 | // remove global current comment |
| | 46 | unset( $GLOBALS['comment'] ); |
| | 47 | |
| | 48 | $this->assertFalse( isset( $GLOBALS['comment'] ) ); |
| | 49 | $this->assertNull( get_comment_reply_link( $args ), $comment ); |
| | 50 | |
| | 51 | // restore current global comment |
| | 52 | $GLOBALS['comment'] = $tmp; |
| | 53 | } |
| | 54 | |