Andrew Nacin
7b9c30f2e3
Remove certain accents in the Danish language.
...
props tlamedia.
fixes #23907 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26585 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-03 20:38:03 +00:00
Andrew Nacin
4cc8c5b241
Restore @ticket reference. Reverts [26093], see #25913 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26552 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-03 03:57:24 +00:00
Scott Taylor
8a10f4a942
Change comments in unit test to reflect patched scenario in #26339 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26511 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-02 00:03:39 +00:00
Scott Taylor
b595282dff
Fix lingering reference problem in wp_get_object_terms()
by not setting the foreach
'd vars to a reference. Adds unit test.
...
Props stephenharris.
Fixes #26339 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26510 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 23:59:13 +00:00
Sergey Biryukov
042370471c
Fix strict notices in Tests_POMO_PO.
...
props markoheijnen for initial patch.
fixes #25631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26500 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 12:47:35 +00:00
Sergey Biryukov
d050f5d3ff
Use assertEqualSets() instead of direct array comparison.
...
fixes #26345
git-svn-id: https://develop.svn.wordpress.org/trunk@26490 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 00:42:39 +00:00
Sergey Biryukov
ce8d689ceb
Make sure the version extracted from readme.html does not include a newline.
...
fixes #26344 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26489 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 00:26:07 +00:00
Sergey Biryukov
a754d62f49
Update unit tests for convert_smilies(). see #25529 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26488 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 00:14:45 +00:00
Sergey Biryukov
efc2c12458
Restore @ticket reference. see #18897 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26479 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-29 21:23:49 +00:00
Helen Hou-Sandi
eaa7c65263
Add remove_option(), remove_options(), and get_options() methods to WP_Screen, along with unit tests. props ocean90, DrewAPicture. fixes #25799 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26456 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-28 05:09:06 +00:00
Peter Westwood
be669106d5
Unit Tests: Add the ticket number to the new tests. See #26290
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26431 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-27 14:47:03 +00:00
Peter Westwood
02ab2c69bb
Unit Tests: Add some simple test cases to highlight the types of html entity that kses currently blocks. See #26290
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26430 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-27 14:44:57 +00:00
Scott Taylor
3c671f031e
When setting WP_TESTS_FORCE_KNOWN_BUGS
to true
, it is preferable that some forced tests are still skipped when they call classes or functions that do not exist, producing fatal errors.
...
Fixes #26248 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26370 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-25 22:49:51 +00:00
Scott Taylor
1dc930ba13
Add unit tests for links_add_target()
. Alter the patterns in links_add_target()
and _links_add_target()
slightly based on learnings after running tests.
...
Props mdbitz.
Fixes #26164 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26328 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-22 16:24:25 +00:00
Scott Taylor
b209e63234
Introduce unit tests for the normalize_whitespace()
function.
...
Props mdbitz.
Fixes #26163 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26327 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-22 16:17:59 +00:00
Sergey Biryukov
27972a39a1
Skip image mime type tests if both fileinfo PHP extension and mime_content_type() function are missing.
...
fixes #26155 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26318 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-22 05:37:35 +00:00
Scott Taylor
926427e9ee
In update_meta_cache()
, ensure that meta is always stored in the same order. Removes an unnecessary $wpdb->prepare
statement. Adds unit test.
...
Props mattheu.
Fixes #25511 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26307 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-21 19:30:35 +00:00
Scott Taylor
72a3c91855
Mark test skipped when not in multisite. See #25883 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26305 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-21 19:13:53 +00:00
Scott Taylor
36a5af537e
Prefix the notoptions
cache key in the multisite site-options
group with $wpdb->siteid
to avoid collisions and race conditions when using a fancy multi-network setup. Adds unit test.
...
Fixes #25883 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26304 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-21 19:06:26 +00:00
Scott Taylor
ff4f1bb170
For unit tests that call wpmu_create_blog()
, Blog factory, or installation code that attempts to clear transients: suppress database errors on setUp
and restore on tearDown
.
...
There are a few places in core that were preventing this from working by explicity setting `$wpdb->suppress_errors` to `false`. Instead, they should inherit the value that existed before errors were suppressed.
This allows Multisite unit tests to run without explosive database errors, and allows `$wpdb->suppress_errors` to be overridden all the way down the chain.
Fixes #26102 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26252 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-18 20:44:34 +00:00
Sergey Biryukov
cbad0abaae
Normalize slashes in WP_Filesystem_MockFS::mkdir() and WP_Filesystem_MockFS::locate_parent_node() to avoid an infinite loop on Windows.
...
fixes #26091 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26246 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-18 15:32:47 +00:00
Andrew Nacin
f82e1c5d23
Add JavaScript tests for shortcode.js.
...
props jorbin, iandunn.
see #25784 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26222 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-15 20:40:54 +00:00
Scott Taylor
15c1c2f130
Don't place smilies inside of pre or code tags. Don't skip smilie after a smilie with an 8 in it. Fix regular expression used for smiley translations to work when there is only one registered emoticon.
...
Props solarissmoke, soulseekah, mdbitz, yonasy. ht to mdbitz for the Unit Tests and a comprehensive patch.
Fixes #16448 , #20124 , #25303 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26191 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-15 02:45:39 +00:00
Scott Taylor
5de39fc2f1
Remove the Featured Content term filters when running Unit Tests. Set the return value of wp_get_object_terms()
to a var before passing to array_shift()
in test_get_object_terms_types()
, which expects a var to be passed by reference.
...
See #25282 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26187 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-15 02:32:16 +00:00
Andrew Nacin
4bb79a2ce3
Add a unit test to confirm that the version number in readme.html matches version.php.
...
3.7.1 shipped with 3.7 in the readme. Not a big deal, but this should prevent it in the future.
git-svn-id: https://develop.svn.wordpress.org/trunk@26166 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-14 16:50:21 +00:00
Scott Taylor
6603f4802a
Always clean install in PHPUnit Tests.
...
Props bpetty.
Fixes #25871 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26095 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 22:14:24 +00:00
Scott Taylor
2ccc101050
Make HTML tag searches for <code>
and <pre>
case-insensitive in make_clickable()
.
...
Props bpetty.
Fixes #23756 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26094 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 21:53:08 +00:00
Scott Taylor
8120f2861c
The test for #5953 doesn't require the ticket to be closed for its assertions to pass.
...
See #25913 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26093 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 21:23:39 +00:00
Scott Taylor
a8e76ea8f9
Set the page_comments
option to true
in Tests_Canonical
to properly check canonical redirection for paged comments. By doing so, one assertion tied to #20388 no longer needs to be.
...
See #20388 , 25913.
git-svn-id: https://develop.svn.wordpress.org/trunk@26091 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 18:57:11 +00:00
Scott Taylor
3cbb68c3af
Avoid Out of range value for column 'post_parent'
error in Tests_Ajax_MediaEdit::_make_attachment()
by setting the default parent id to 0
instead of -1
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26088 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 17:51:29 +00:00
Scott Taylor
0fdff310fd
Fix a failing unit test: an XML-RPC unit test for getPosts with filters was failing. The cause of the failure: a set of posts was created with create_many() and then paginated results were requested. The paginated results were meant to equal the original resultset when diff'd after all pages were joined. create_many() was assigning the same timestamp to all posts, so the LIMIT clause in the generated SQL was not operating as expected. I replaced the create_many() call with a create() loop that increments time by 1 each time. Unit test now passes.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26087 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 17:45:36 +00:00
Scott Taylor
e86c049a50
Fix inexcusable whitespace in tests/phpunit/tests/post/query.php
.
...
Props wonderboymusic.
git-svn-id: https://develop.svn.wordpress.org/trunk@26056 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-08 23:13:41 +00:00
Scott Taylor
047f7fb8bd
Produce proper CAST
for DECIMAL
and NUMERIC
in Meta Query. Adds a bunch of unit tests.
...
Props ericlewis.
Fixes #23033 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26055 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-08 23:10:41 +00:00
Scott Taylor
cc19bb3a57
Respect the compare
operator value in meta_query
when value
evaluates to null
. Adds Unit Test.
...
Props bradyvercher, gradyetc.
Fixes #22967 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26053 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-08 22:51:03 +00:00
Scott Taylor
0670cf7cc4
Don't convert URLs inside <pre>
and <code>
tags when parsing string using make_clickable()
.
...
Adds Unit Tests.
Props johnjamesjacoby, helen, nacin, adamsilverstein, sirbrillig.
Fixes #23756 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26052 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-08 22:37:41 +00:00
Andrew Nacin
aacc286f7c
Use only one var per scope in our password-strength-meter tests.
...
props kadamwhite.
see #25187 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26040 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-07 20:40:12 +00:00
Sergey Biryukov
fc8d09e2a6
A negative term parent value should be sanitized to 0, not 1. Fix a regression in sanitize_term_field() caused by [26010].
...
props mattheu for initial patch.
fixes #25852 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26028 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-06 23:40:46 +00:00
Scott Taylor
d8f57f88ad
Respect paged
when offset
is used in WP_Query
. Adds unit tests.
...
Props coffee2code.
Fixes #18897 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26012 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-05 01:34:44 +00:00
Scott Taylor
ed22220a0f
Cast proper fields to int
when returning from wp_get_object_terms()
. Add term_taxonomy_id
and object_id
to the list in sanitize_term()
and sanitize_term_field()
.
...
Fixes #17646 . Adds unit tests.
Props simonwheatley, dd32, kovshenin.
git-svn-id: https://develop.svn.wordpress.org/trunk@26010 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-05 01:18:02 +00:00
Scott Taylor
0923b7b93a
Category and tag are typically checked before checking for a custom taxonomy. If the global query matches category or tag (even if it also has tax_query set), return category/tag as the queried object, instead of arbitrarily returning the first term in the tax_query
stack (typically those added with 'pre_get_posts').
...
Real world example: http://www.emusic.com/17dots/topics/daily-download/ - "tag" page, regionalized for US-only content using `pre_get_posts` passing in the terms "US" and "ALL" for "region" (custom tax). All of the theme functions would output "ALL" as the term name. Even though it was a tag archive, the queried object was an arbitrary term from `tax_query`.
See [26006]. All unit tests pass.
Fixes #20767 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26007 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-04 23:53:55 +00:00
Scott Taylor
5321bc4957
WP_UnitTestCase::go_to()
tried its best to clean up global space, but ultimately fell short. Because it was blowing away WP
every time it was called, it was dropping all the query vars that were registered for custom taxonomies and custom post types (ouch).
...
Introduces `_cleanup_query_vars()`. This is a prerequisite for the unit tests on #20767 . All unit tests pass with this change.
See #20767 .
Fixes #25818 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26006 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-04 22:46:44 +00:00
Scott Taylor
2f38d2efc6
Move Tests_Query_Conditionals::assertQueryTrue()
to WP_UnitTestCase
. It should be available to all unit test classes. The conditionals class is huge, other classes are necessary for better coverage.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@26005 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-04 21:55:12 +00:00
Scott Taylor
ecbcfc5a20
Set the default parent id to 0, instead of -1, in Tests_Post_Attachments::_make_attachment()
. Prevents Out of range value for column 'post_parent'
database error without papering over it in core.
...
See #25282 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26004 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-04 21:39:35 +00:00
Andrew Nacin
5c63859ffb
Add jshintrc to qunit.
...
props jorbin.
see #25187 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25992 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-30 14:38:37 +00:00
Andrew Nacin
9b9311ae2b
Move the unit test added in [25974] to the more appropriate file. see #25750 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25975 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-29 01:47:48 +00:00
Andrew Nacin
2cac0fde8a
Avoid resetting the 'hierarchical' argument in get_pages() when 'parent' is -1, the default.
...
Fixes a regression introduced in [25270]. Adds unit tests.
props chrisbliss18.
fixes #25750 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25974 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-29 01:46:01 +00:00
Sergey Biryukov
ddf0147a4f
Move test_get_pages_include_exclude() and test_get_pages_parent() to tests/post/getPages.php. Add a @ticket reference. see [25168] and [25244].
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25972 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-28 21:49:27 +00:00
Andrew Nacin
add8bc4e57
Add a $taxonomy argument to each of the adjacent post functions.
...
Each took an array of category (IDs) when to search. Those can now be term IDs and each function now has $taxonomy = 'category' as an optional argument.
Functions affected: get_previous_post(), get_next_post(), get_adjacent_post(), get_adjacent_post_rel_link(), adjacent_posts_rel_link(), next_post_rel_link(), prev_post_rel_link(), get_boundary_post(), get_previous_post_link(), previous_post_link(), get_next_post_link(), next_post_link(), get_adjacent_post_link(), adjacent_post_link().
props ethitter.
finally fixes #17807 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25959 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-27 21:39:51 +00:00
Andrew Nacin
90b55d0279
Fix the exclude_tree argument in get_terms(), which fixes the exclude argument in wp_list_categories().
...
This was a 3.7 regression caused by [25162].
props dd32.
see #25710 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@25933 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 15:03:10 +00:00
Andrew Nacin
559dc21202
3.7 regression from [25119]: Have in_category() return false when the first argument is empty.
...
Adds unit tests.
props ericlewis.
fixes #25706 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@25923 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 02:53:30 +00:00