<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[54704] trunk/tests/phpunit/tests/comment: Tests: Rename classes in `phpunit/tests/comment/` per the naming conventions.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/54704">54704</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/54704","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2022-10-27 15:53:08 +0000 (Thu, 27 Oct 2022)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tests: Rename classes in `phpunit/tests/comment/` per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization
Follow-up to <a href="https://core.trac.wordpress.org/changeset/47780">[47780]</a>, <a href="https://core.trac.wordpress.org/changeset/48911">[48911]</a>, <a href="https://core.trac.wordpress.org/changeset/49327">[49327]</a>, <a href="https://core.trac.wordpress.org/changeset/50291">[50291]</a>, <a href="https://core.trac.wordpress.org/changeset/50292">[50292]</a>, <a href="https://core.trac.wordpress.org/changeset/50342">[50342]</a>, <a href="https://core.trac.wordpress.org/changeset/50452">[50452]</a>, <a href="https://core.trac.wordpress.org/changeset/50453">[50453]</a>, <a href="https://core.trac.wordpress.org/changeset/50456">[50456]</a>, <a href="https://core.trac.wordpress.org/changeset/50967">[50967]</a>, <a href="https://core.trac.wordpress.org/changeset/50968">[50968]</a>, <a href="https://core.trac.wordpress.org/changeset/50969">[50969]</a>, <a href="https://core.trac.wordpress.org/changeset/51491">[51491]</a>, <a href="https://core.trac.wordpress.org/changeset/51492">[514
92]</a>, <a href="https://core.trac.wordpress.org/changeset/51493">[51493]</a>, <a href="https://core.trac.wordpress.org/changeset/51623">[51623]</a>, <a href="https://core.trac.wordpress.org/changeset/51639">[51639]</a>, <a href="https://core.trac.wordpress.org/changeset/51646">[51646]</a>, <a href="https://core.trac.wordpress.org/changeset/51650">[51650]</a>, <a href="https://core.trac.wordpress.org/changeset/51651">[51651]</a>, <a href="https://core.trac.wordpress.org/changeset/51860">[51860]</a>, <a href="https://core.trac.wordpress.org/changeset/52264">[52264]</a>, <a href="https://core.trac.wordpress.org/changeset/52265">[52265]</a>, <a href="https://core.trac.wordpress.org/changeset/53489">[53489]</a>, <a href="https://core.trac.wordpress.org/changeset/53863">[53863]</a>.
See <a href="https://core.trac.wordpress.org/ticket/56793">#56793</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestscommentgetCommentAuthorUrlphp">trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php</a></li>
<li><a href="#trunktestsphpunittestscommentgetCommentCountphp">trunk/tests/phpunit/tests/comment/getCommentCount.php</a></li>
<li><a href="#trunktestsphpunittestscommentgetCommentExcerptphp">trunk/tests/phpunit/tests/comment/getCommentExcerpt.php</a></li>
<li><a href="#trunktestsphpunittestscommentmetaCachephp">trunk/tests/phpunit/tests/comment/metaCache.php</a></li>
<li><a href="#trunktestsphpunittestscommentqueryphp">trunk/tests/phpunit/tests/comment/query.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpBatchUpdateCommentTypephp">trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpCommentphp">trunk/tests/phpunit/tests/comment/wpComment.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpCountCommentsphp">trunk/tests/phpunit/tests/comment/wpCountComments.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpUpdateCommentCountNowphp">trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestscommentgetLastCommentModifiedphp">trunk/tests/phpunit/tests/comment/getLastCommentModified.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpCheckCommentDisallowedListphp">trunk/tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestscommentlastCommentModifiedphp">trunk/tests/phpunit/tests/comment/lastCommentModified.php</a></li>
<li><a href="#trunktestsphpunittestscommentwpBlacklistCheckphp">trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestscommentgetCommentAuthorUrlphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @group comment
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *@covers ::get_comment_author_url
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_comment_author_url
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Comment_GetCommentAuthorUrl extends WP_UnitTestCase {
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_comment_author_url_filter( $url, $id, $comment ) {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentgetCommentCountphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/getCommentCount.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentCount.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/getCommentCount.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,11 +3,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @group comment
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Class Tests_Get_Comment_Count
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_comment_count
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Get_Comment_Count extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_GetCommentCount extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_comment_count() {
</span><span class="cx" style="display: block; padding: 0 10px"> $count = get_comment_count();
</span></span></pre></div>
<a id="trunktestsphpunittestscommentgetCommentExcerptphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/getCommentExcerpt.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getCommentExcerpt.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/getCommentExcerpt.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,11 +3,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @group comment
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Class Tests_Get_Comment_Excerpt
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_comment_excerpt
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Get_Comment_Excerpt extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_GetCommentExcerpt extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px"> protected static $bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> Brisket shank rump, tongue beef ribs swine fatback turducken capicola meatball picanha chicken cupim meatloaf turkey. Bacon biltong shoulder tail frankfurter boudin cupim turkey drumstick. Porchetta pig shoulder, jerky flank pork tail meatball hamburger. Doner ham hock ribeye tail jerky swine. Leberkas ribeye pancetta, tenderloin capicola doner turducken chicken venison ground round boudin pork chop. Tail pork loin pig spare ribs, biltong ribeye brisket pork chop cupim. Short loin leberkas spare ribs jowl landjaeger tongue kevin flank bacon prosciutto.
</span></span></pre></div>
<a id="trunktestsphpunittestscommentgetLastCommentModifiedphpfromrev54703trunktestsphpunittestscommentlastCommentModifiedphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/tests/phpunit/tests/comment/getLastCommentModified.php (from rev 54703, trunk/tests/phpunit/tests/comment/lastCommentModified.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/getLastCommentModified.php (rev 0)
+++ trunk/tests/phpunit/tests/comment/getLastCommentModified.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,140 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+/**
+ * @group comment
+ * @ticket 38027
+ *
+ * @covers ::get_lastcommentmodified
+ */
+class Tests_Comment_GetLastCommentModified extends WP_UnitTestCase {
+ public function test_no_comments() {
+ $this->assertFalse( get_lastcommentmodified() );
+ }
+
+ public function test_default_timezone() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
+ }
+
+ public function test_server_timezone() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
+ }
+
+ public function test_blog_timezone() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ $this->assertSame( '2000-01-01 11:00:00', get_lastcommentmodified( 'blog' ) );
+ }
+
+ public function test_gmt_timezone() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified( 'GMT' ) ) );
+ }
+
+ public function test_unknown_timezone() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ $this->assertFalse( get_lastcommentmodified( 'foo' ) );
+ }
+
+ public function test_data_is_cached() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2015-04-01 11:00:00',
+ 'comment_date_gmt' => '2015-04-01 10:00:00',
+ )
+ );
+
+ get_lastcommentmodified();
+ $this->assertSame( strtotime( '2015-04-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
+ }
+
+ public function test_cache_is_cleared() {
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-01 11:00:00',
+ 'comment_date_gmt' => '2000-01-01 10:00:00',
+ )
+ );
+
+ get_lastcommentmodified();
+
+ $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
+
+ self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-02 11:00:00',
+ 'comment_date_gmt' => '2000-01-02 10:00:00',
+ )
+ );
+
+ $this->assertFalse( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) );
+ $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( get_lastcommentmodified() ) );
+ $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
+ }
+
+ public function test_cache_is_cleared_when_comment_is_trashed() {
+ $comment_1 = self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '1998-01-01 11:00:00',
+ 'comment_date_gmt' => '1998-01-01 10:00:00',
+ )
+ );
+
+ $comment_2 = self::factory()->comment->create_and_get(
+ array(
+ 'comment_status' => 1,
+ 'comment_date' => '2000-01-02 11:00:00',
+ 'comment_date_gmt' => '2000-01-02 10:00:00',
+ )
+ );
+
+ get_lastcommentmodified();
+
+ $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
+
+ wp_trash_comment( $comment_2->comment_ID );
+
+ $this->assertFalse( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) );
+ $this->assertSame( strtotime( '1998-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
+ $this->assertSame( strtotime( '1998-01-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
+ }
+}
</ins></span></pre></div>
<a id="trunktestsphpunittestscommentlastCommentModifiedphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/tests/phpunit/tests/comment/lastCommentModified.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/lastCommentModified.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/lastCommentModified.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,140 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * @group comment
- * @ticket 38027
- *
- * @covers ::get_lastcommentmodified
- */
-class Tests_Comment_Last_Modified extends WP_UnitTestCase {
- public function test_no_comments() {
- $this->assertFalse( get_lastcommentmodified() );
- }
-
- public function test_default_timezone() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
- }
-
- public function test_server_timezone() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
- }
-
- public function test_blog_timezone() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- $this->assertSame( '2000-01-01 11:00:00', get_lastcommentmodified( 'blog' ) );
- }
-
- public function test_gmt_timezone() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( get_lastcommentmodified( 'GMT' ) ) );
- }
-
- public function test_unknown_timezone() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- $this->assertFalse( get_lastcommentmodified( 'foo' ) );
- }
-
- public function test_data_is_cached() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2015-04-01 11:00:00',
- 'comment_date_gmt' => '2015-04-01 10:00:00',
- )
- );
-
- get_lastcommentmodified();
- $this->assertSame( strtotime( '2015-04-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
- }
-
- public function test_cache_is_cleared() {
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-01 11:00:00',
- 'comment_date_gmt' => '2000-01-01 10:00:00',
- )
- );
-
- get_lastcommentmodified();
-
- $this->assertSame( strtotime( '2000-01-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
-
- self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-02 11:00:00',
- 'comment_date_gmt' => '2000-01-02 10:00:00',
- )
- );
-
- $this->assertFalse( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) );
- $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( get_lastcommentmodified() ) );
- $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
- }
-
- public function test_cache_is_cleared_when_comment_is_trashed() {
- $comment_1 = self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '1998-01-01 11:00:00',
- 'comment_date_gmt' => '1998-01-01 10:00:00',
- )
- );
-
- $comment_2 = self::factory()->comment->create_and_get(
- array(
- 'comment_status' => 1,
- 'comment_date' => '2000-01-02 11:00:00',
- 'comment_date_gmt' => '2000-01-02 10:00:00',
- )
- );
-
- get_lastcommentmodified();
-
- $this->assertSame( strtotime( '2000-01-02 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
-
- wp_trash_comment( $comment_2->comment_ID );
-
- $this->assertFalse( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) );
- $this->assertSame( strtotime( '1998-01-01 10:00:00' ), strtotime( get_lastcommentmodified() ) );
- $this->assertSame( strtotime( '1998-01-01 10:00:00' ), strtotime( wp_cache_get( 'lastcommentmodified:server', 'timeinfo' ) ) );
- }
-}
</del></span></pre></div>
<a id="trunktestsphpunittestscommentmetaCachephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/metaCache.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/metaCache.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/metaCache.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @group comment
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Comment_Meta_Cache extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_MetaCache extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px"> protected $i = 0;
</span><span class="cx" style="display: block; padding: 0 10px"> protected $queries = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestscommentqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/query.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/query.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2080,11 +2080,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $c3 ), $comment_ids );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * @ticket 29885
- *
- * @covers ::get_comments
- */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * @ticket 29885
+ *
+ * @covers ::get_comments
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> public function test_fields_author__in() {
</span><span class="cx" style="display: block; padding: 0 10px"> $p1 = self::factory()->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> $p2 = self::factory()->post->create();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2130,11 +2130,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSameSets( array( $c1, $c3 ), $comment_ids );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * @ticket 29885
- *
- * @covers ::get_comments
- */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * @ticket 29885
+ *
+ * @covers ::get_comments
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> public function test_fields_author__not_in() {
</span><span class="cx" style="display: block; padding: 0 10px"> $p1 = self::factory()->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> $p2 = self::factory()->post->create();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3328,7 +3328,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @covers WP_Comment_Query::query
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_post_name_single_value() {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentwpBatchUpdateCommentTypephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,7 +5,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::_wp_batch_update_comment_type
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Batch_Update_Comment_Type extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_wpBatchUpdateCommentType extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 49236
</span></span></pre></div>
<a id="trunktestsphpunittestscommentwpBlacklistCheckphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,103 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * @group comment
- */
-class Tests_WP_Blocklist_Check extends WP_UnitTestCase {
-
- public function test_should_return_true_when_content_matches_disallowed_keys() {
- $author = 'Sting';
- $author_email = 'sting@example.com';
- $author_url = 'http://example.com';
- $comment = "There's a hole in my heart. As deep as a well. For that poor little boy. Who's stuck halfway to Hell.";
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', "well\nfoo" );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertTrue( $result );
- }
-
- /**
- * @ticket 37208
- */
- public function test_should_return_true_when_content_with_html_matches_disallowed_keys() {
- $author = 'Sting';
- $author_email = 'sting@example.com';
- $author_url = 'http://example.com';
- $comment = "There's a hole in my heart. As deep as a well. For that poor little boy. Who's stuck <b>half</b>way to Hell.";
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', "halfway\nfoo" );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertTrue( $result );
- }
-
- public function test_should_return_true_when_author_matches_disallowed_keys() {
- $author = 'Sideshow Mel';
- $author_email = 'mel@example.com';
- $author_url = 'http://example.com';
- $comment = "Though we can't get him out. We'll do the next best thing.";
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', "sideshow\nfoo" );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertTrue( $result );
- }
-
- public function test_should_return_true_when_url_matches_disallowed_keys() {
- $author = 'Rainier Wolfcastle';
- $author_email = 'rainier@wolfcastle.com';
- $author_url = 'http://example.com';
- $comment = 'We go on TV and sing, sing, sing.';
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', "example\nfoo" );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertTrue( $result );
- }
-
- /**
- * @ticket 37208
- */
- public function test_should_return_true_when_link_matches_disallowed_keys() {
- $author = 'Rainier Wolfcastle';
- $author_email = 'rainier@wolfcastle.com';
- $author_url = 'http://example.com';
- $comment = 'We go on TV and sing, <a href="http://example.com/spam/>sing</a>, sing.';
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', '/spam/' );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertTrue( $result );
- }
-
- public function test_should_return_false_when_no_match() {
- $author = 'Krusty the Clown';
- $author_email = 'krusty@example.com';
- $author_url = 'http://example.com';
- $comment = "And we're sending our love down the well.";
- $author_ip = '192.168.0.1';
- $user_agent = '';
-
- update_option( 'disallowed_keys', "sideshow\nfoobar" );
-
- $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
-
- $this->assertFalse( $result );
- }
-}
</del></span></pre></div>
<a id="trunktestsphpunittestscommentwpCheckCommentDisallowedListphpfromrev54703trunktestsphpunittestscommentwpBlacklistCheckphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php (from rev 54703, trunk/tests/phpunit/tests/comment/wpBlacklistCheck.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php (rev 0)
+++ trunk/tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,105 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+/**
+ * @group comment
+ *
+ * @covers ::wp_check_comment_disallowed_list
+ */
+class Tests_Comment_wpCheckCommentDisallowedList extends WP_UnitTestCase {
+
+ public function test_should_return_true_when_content_matches_disallowed_keys() {
+ $author = 'Sting';
+ $author_email = 'sting@example.com';
+ $author_url = 'http://example.com';
+ $comment = "There's a hole in my heart. As deep as a well. For that poor little boy. Who's stuck halfway to Hell.";
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', "well\nfoo" );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertTrue( $result );
+ }
+
+ /**
+ * @ticket 37208
+ */
+ public function test_should_return_true_when_content_with_html_matches_disallowed_keys() {
+ $author = 'Sting';
+ $author_email = 'sting@example.com';
+ $author_url = 'http://example.com';
+ $comment = "There's a hole in my heart. As deep as a well. For that poor little boy. Who's stuck <b>half</b>way to Hell.";
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', "halfway\nfoo" );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertTrue( $result );
+ }
+
+ public function test_should_return_true_when_author_matches_disallowed_keys() {
+ $author = 'Sideshow Mel';
+ $author_email = 'mel@example.com';
+ $author_url = 'http://example.com';
+ $comment = "Though we can't get him out. We'll do the next best thing.";
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', "sideshow\nfoo" );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertTrue( $result );
+ }
+
+ public function test_should_return_true_when_url_matches_disallowed_keys() {
+ $author = 'Rainier Wolfcastle';
+ $author_email = 'rainier@wolfcastle.com';
+ $author_url = 'http://example.com';
+ $comment = 'We go on TV and sing, sing, sing.';
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', "example\nfoo" );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertTrue( $result );
+ }
+
+ /**
+ * @ticket 37208
+ */
+ public function test_should_return_true_when_link_matches_disallowed_keys() {
+ $author = 'Rainier Wolfcastle';
+ $author_email = 'rainier@wolfcastle.com';
+ $author_url = 'http://example.com';
+ $comment = 'We go on TV and sing, <a href="http://example.com/spam/>sing</a>, sing.';
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', '/spam/' );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertTrue( $result );
+ }
+
+ public function test_should_return_false_when_no_match() {
+ $author = 'Krusty the Clown';
+ $author_email = 'krusty@example.com';
+ $author_url = 'http://example.com';
+ $comment = "And we're sending our love down the well.";
+ $author_ip = '192.168.0.1';
+ $user_agent = '';
+
+ update_option( 'disallowed_keys', "sideshow\nfoobar" );
+
+ $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent );
+
+ $this->assertFalse( $result );
+ }
+}
</ins></span></pre></div>
<a id="trunktestsphpunittestscommentwpCommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/wpComment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpComment.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/wpComment.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,7 +5,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers WP_Comment::get_instance
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Term_WpComment extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_WpComment extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px"> protected static $comment_id;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
</span></span></pre></div>
<a id="trunktestsphpunittestscommentwpCountCommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/wpCountComments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpCountComments.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/wpCountComments.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,11 +3,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @group comment
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Class Tests_WP_Count_Comments
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @covers ::wp_count_comments
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_WP_Count_Comments extends WP_UnitTestCase {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_wpCountComments extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_count_comments() {
</span><span class="cx" style="display: block; padding: 0 10px"> $count = wp_count_comments();
</span></span></pre></div>
<a id="trunktestsphpunittestscommentwpUpdateCommentCountNowphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php 2022-10-27 15:39:20 UTC (rev 54703)
+++ trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php 2022-10-27 15:53:08 UTC (rev 54704)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,10 +5,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::wp_update_comment_count_now
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class Tests_Update_Comment_Count_Now extends WP_UnitTestCase {
- public function _return_100() {
- return 100;
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class Tests_Comment_wpUpdateCommentCountNow extends WP_UnitTestCase {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_invalid_post_bails_early() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( wp_update_comment_count_now( 100 ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,4 +47,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'pre_wp_update_comment_count_now', array( $this, '_return_100' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ public function _return_100() {
+ return 100;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>
</body>
</html>