<!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>[25409] trunk/tests/phpunit/tests: Use @expectedDeprecated.</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 { 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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/25409">25409</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-09-12 18:37:32 +0000 (Thu, 12 Sep 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use @expectedDeprecated. see <a href="http://core.trac.wordpress.org/ticket/25282">#25282</a>, <a href="http://core.trac.wordpress.org/changeset/25408">[25408]</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsadminincludesThemephp">trunk/tests/phpunit/tests/admin/includesTheme.php</a></li>
<li><a href="#trunktestsphpunittestsformattingCleanPrephp">trunk/tests/phpunit/tests/formatting/CleanPre.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionsdeprecatedphp">trunk/tests/phpunit/tests/functions/deprecated.php</a></li>
<li><a href="#trunktestsphpunittestsimagefunctionsphp">trunk/tests/phpunit/tests/image/functions.php</a></li>
<li><a href="#trunktestsphpunittestsimagesizephp">trunk/tests/phpunit/tests/image/size.php</a></li>
<li><a href="#trunktestsphpunittestsmediaphp">trunk/tests/phpunit/tests/media.php</a></li>
<li><a href="#trunktestsphpunittestsmsphp">trunk/tests/phpunit/tests/ms.php</a></li>
<li><a href="#trunktestsphpunitteststhemethemeDirphp">trunk/tests/phpunit/tests/theme/themeDir.php</a></li>
<li><a href="#trunktestsphpunitteststhemephp">trunk/tests/phpunit/tests/theme.php</a></li>
<li><a href="#trunktestsphpunittestsusercapabilitiesphp">trunk/tests/phpunit/tests/user/capabilities.php</a></li>
<li><a href="#trunktestsphpunittestsuserphp">trunk/tests/phpunit/tests/user.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsadminincludesThemephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/admin/includesTheme.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/admin/includesTheme.php        2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/admin/includesTheme.php   2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -3,7 +3,6 @@
</span><span class="cx">  * @group themes
</span><span class="cx">  */
</span><span class="cx"> class Tests_Admin_includesTheme extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'get_theme', 'get_themes', 'get_theme_data', 'get_current_theme' );
</del><span class="cx"> 
</span><span class="cx">  function setUp() {
</span><span class="cx">          parent::setUp();
</span><span class="lines">@@ -40,6 +39,8 @@
</span><span class="cx">  /**
</span><span class="cx">   * @ticket 10959
</span><span class="cx">   * @ticket 11216
</span><ins>+        * @expectedDeprecated get_theme
+        * @expectedDeprecated get_themes
</ins><span class="cx">    */
</span><span class="cx">  function test_page_templates() {
</span><span class="cx">          $theme = get_theme( 'Page Template Theme' );
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingCleanPrephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/formatting/CleanPre.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/formatting/CleanPre.php        2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/formatting/CleanPre.php   2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -5,9 +5,9 @@
</span><span class="cx">  * tags within `<pre>` elements as part of wpautop().
</span><span class="cx">  *
</span><span class="cx">  * @group formatting
</span><ins>+ * @expectedDeprecated clean_pre
</ins><span class="cx">  */
</span><span class="cx"> class Tests_Formatting_CleanPre extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'clean_pre' );
</del><span class="cx"> 
</span><span class="cx">  function test_removes_self_closing_br_with_space() {
</span><span class="cx">          $source = 'a b c\n<br />sldfj<br />';
</span></span></pre></div>
<a id="trunktestsphpunittestsfunctionsdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/functions/deprecated.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/functions/deprecated.php       2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/functions/deprecated.php  2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -136,6 +136,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Test that wp_save_image_file has a deprecated argument when passed a GD resource
</span><span class="cx">   * @ticket 6821
</span><ins>+        * @expectedDeprecated wp_save_image_file
</ins><span class="cx">    */
</span><span class="cx">  public function test_wp_save_image_file_deprecated_with_gd_resource() {
</span><span class="cx">          if ( !function_exists( 'imagejpeg' ) )
</span></span></pre></div>
<a id="trunktestsphpunittestsimagefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/image/functions.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/image/functions.php    2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/image/functions.php       2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">  * @group upload
</span><span class="cx">  */
</span><span class="cx"> class Tests_Image_Functions extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'wp_load_image' );
</del><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * Setup test fixture
</span><span class="lines">@@ -235,7 +234,9 @@
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * Try loading a directory
</span><ins>+        *
</ins><span class="cx">    * @ticket 17814
</span><ins>+        * @expectedDeprecated wp_load_image
</ins><span class="cx">    */
</span><span class="cx">  public function test_load_directory() {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsimagesizephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/image/size.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/image/size.php 2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/image/size.php    2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -6,8 +6,7 @@
</span><span class="cx">  * @group upload
</span><span class="cx">  */
</span><span class="cx"> class Tests_Image_Size extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'wp_shrink_dimensions' );
-       
</del><ins>+
</ins><span class="cx">   function test_constrain_dims_zero() {
</span><span class="cx">          if (!is_callable('wp_constrain_dimensions'))
</span><span class="cx">                  $this->markTestSkipped('wp_constrain_dimensions() is not callable.');
</span><span class="lines">@@ -97,6 +96,9 @@
</span><span class="cx">          $this->assertequals(array(525, 700), $out);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated wp_shrink_dimensions
+        */
</ins><span class="cx">   function test_shrink_dimensions_default() {
</span><span class="cx">          $out = wp_shrink_dimensions(640, 480);
</span><span class="cx">          $this->assertEquals(array(128, 96), $out);
</span><span class="lines">@@ -105,6 +107,9 @@
</span><span class="cx">          $this->assertEquals(array(72, 96), $out);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated wp_shrink_dimensions
+        */
</ins><span class="cx">   function test_shrink_dimensions_smaller() {
</span><span class="cx">          // image size is smaller than the constraint - no effect
</span><span class="cx">          $out = wp_shrink_dimensions(500, 600, 1024, 768);
</span><span class="lines">@@ -114,6 +119,9 @@
</span><span class="cx">          $this->assertEquals(array(600, 500), $out);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated wp_shrink_dimensions
+        */
</ins><span class="cx">   function test_shrink_dimensions_equal() {
</span><span class="cx">          // image size is equal to the constraint - no effect
</span><span class="cx">          $out = wp_shrink_dimensions(500, 600, 500, 600);
</span><span class="lines">@@ -123,6 +131,9 @@
</span><span class="cx">          $this->assertEquals(array(600, 500), $out);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated wp_shrink_dimensions
+        */
</ins><span class="cx">   function test_shrink_dimensions_larger() {
</span><span class="cx">          // image size is larger than the constraint - result should be constrained
</span><span class="cx">          $out = wp_shrink_dimensions(1024, 768, 500, 600);
</span><span class="lines">@@ -132,6 +143,9 @@
</span><span class="cx">          $this->assertequals(array(225, 600), $out);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated wp_shrink_dimensions
+        */
</ins><span class="cx">   function test_shrink_dimensions_boundary() {
</span><span class="cx">          // one dimension is larger than the constraint, one smaller - result should be constrained
</span><span class="cx">          $out = wp_shrink_dimensions(1024, 768, 500, 800);
</span></span></pre></div>
<a id="trunktestsphpunittestsmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/media.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/media.php      2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/media.php 2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -5,7 +5,6 @@
</span><span class="cx">  * @group shortcode
</span><span class="cx">  */
</span><span class="cx"> class Tests_Media extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'wp_convert_bytes_to_hr' );
</del><span class="cx"> 
</span><span class="cx">  function setUp() {
</span><span class="cx">          parent::setUp();
</span><span class="lines">@@ -151,6 +150,7 @@
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * @ticket 19067
</span><ins>+        * @expectedDeprecated wp_convert_bytes_to_hr
</ins><span class="cx">    */
</span><span class="cx">  function test_wp_convert_bytes_to_hr() {
</span><span class="cx">          $kb = 1024;
</span></span></pre></div>
<a id="trunktestsphpunittestsmsphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/ms.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/ms.php 2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/ms.php    2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -8,7 +8,6 @@
</span><span class="cx">  * @group multisite
</span><span class="cx">  */
</span><span class="cx"> class Tests_MS extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'is_blog_user', 'get_dashboard_blog' );
</del><span class="cx">   protected $plugin_hook_count = 0;
</span><span class="cx"> 
</span><span class="cx">  function setUp() {
</span><span class="lines">@@ -137,6 +136,9 @@
</span><span class="cx">          $this->assertEquals( array(), get_blogs_of_user( $user1_id ) );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated is_blog_user
+        */
</ins><span class="cx">   function test_is_blog_user() {
</span><span class="cx">          global $wpdb;
</span><span class="cx"> 
</span><span class="lines">@@ -263,6 +265,9 @@
</span><span class="cx">          $this->assertFalse( users_can_register_signup_filter() );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_dashboard_blog
+        */
</ins><span class="cx">   function test_get_dashboard_blog() {
</span><span class="cx">          // if there is no dashboard blog set, current blog is used
</span><span class="cx">          $dashboard_blog = get_dashboard_blog();
</span></span></pre></div>
<a id="trunktestsphpunitteststhemethemeDirphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/theme/themeDir.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/theme/themeDir.php     2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/theme/themeDir.php        2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">  * @group themes
</span><span class="cx">  */
</span><span class="cx"> class Tests_Theme_ThemeDir extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'get_theme', 'get_themes', 'get_theme_data', 'get_current_theme', 'get_broken_themes' );
</del><span class="cx"> 
</span><span class="cx">  function setUp() {
</span><span class="cx">          parent::setUp();
</span><span class="lines">@@ -40,6 +39,10 @@
</span><span class="cx">          return $this->theme_root;
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_theme_default() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx">          $theme = get_theme('WordPress Default');
</span><span class="lines">@@ -67,6 +70,10 @@
</span><span class="cx">          $this->assertEquals( '', $theme['Parent Theme'] );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_theme_sandbox() {
</span><span class="cx">          $theme = get_theme('Sandbox');
</span><span class="cx"> 
</span><span class="lines">@@ -98,7 +105,11 @@
</span><span class="cx"> 
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       // a css only theme
</del><ins>+        /**
+        * A CSS-only theme
+        *
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_theme_stylesheet_only() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx"> 
</span><span class="lines">@@ -126,6 +137,9 @@
</span><span class="cx"> 
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_theme_list() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx"> 
</span><span class="lines">@@ -153,6 +167,10 @@
</span><span class="cx">          $this->assertEquals($expected, $theme_names);
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_themes
+        * @expectedDeprecated get_broken_themes
+        */
</ins><span class="cx">   function test_broken_themes() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx">          $expected = array('broken-theme' => array('Name' => 'broken-theme', 'Title' => 'broken-theme', 'Description' => __('Stylesheet is missing.')));
</span><span class="lines">@@ -165,6 +183,9 @@
</span><span class="cx">          $this->assertFalse( wp_get_theme( 'sandbox' )->errors() );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_page_templates() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx"> 
</span><span class="lines">@@ -175,6 +196,9 @@
</span><span class="cx">          $this->assertTrue( in_array( $this->theme_root . '/page-templates/template-top-level.php', $templates));
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme_data
+        */
</ins><span class="cx">   function test_get_theme_data_top_level() {
</span><span class="cx">          $theme_data = get_theme_data( DIR_TESTDATA . '/themedir1/theme1/style.css' );
</span><span class="cx"> 
</span><span class="lines">@@ -191,6 +215,9 @@
</span><span class="cx">          $this->assertEquals( 'Minnie Bannister', $theme_data['AuthorName'] );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme_data
+        */
</ins><span class="cx">   function test_get_theme_data_subdir() {
</span><span class="cx">          $theme_data = get_theme_data( $this->theme_root . '/subdir/theme2/style.css' );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunktestsphpunitteststhemephp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/theme.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/theme.php      2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/theme.php 2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">  * @group themes
</span><span class="cx">  */
</span><span class="cx"> class Tests_Theme extends WP_UnitTestCase {
</span><del>-       protected $deprecated_functions = array( 'get_theme', 'get_themes', 'get_theme_data', 'get_current_theme' );
</del><span class="cx">   protected $theme_slug = 'twentyeleven';
</span><span class="cx">  protected $theme_name = 'Twenty Eleven';
</span><span class="cx"> 
</span><span class="lines">@@ -34,6 +33,10 @@
</span><span class="cx">          $this->assertEquals( $themes[ $this->theme_slug ], $single_theme );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_get_themes_default() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx">          $this->assertInstanceOf( 'WP_Theme', $themes[ $this->theme_name ] );
</span><span class="lines">@@ -44,6 +47,10 @@
</span><span class="cx">          $this->assertEquals( $this->theme_name, $themes[ $this->theme_name ]->name );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_theme
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_get_theme() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx">          foreach (array_keys($themes) as $name) {
</span><span class="lines">@@ -67,6 +74,9 @@
</span><span class="cx">          }
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_themes
+        */
</ins><span class="cx">   function test_get_themes_contents() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx">          // Generic tests that should hold true for any theme
</span><span class="lines">@@ -153,6 +163,7 @@
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * @ticket 20897
</span><ins>+        * @expectedDeprecated get_theme_data
</ins><span class="cx">    */
</span><span class="cx">  function test_extra_theme_headers() {
</span><span class="cx">          $wp_theme = wp_get_theme( $this->theme_slug );
</span><span class="lines">@@ -170,6 +181,10 @@
</span><span class="cx">          return array( 'License' );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated get_themes
+        * @expectedDeprecated get_current_theme
+        */
</ins><span class="cx">   function test_switch_theme() {
</span><span class="cx">          $themes = get_themes();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsusercapabilitiesphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/user/capabilities.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/user/capabilities.php  2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/user/capabilities.php     2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -8,7 +8,6 @@
</span><span class="cx">  */
</span><span class="cx"> class Tests_User_Capabilities extends WP_UnitTestCase {
</span><span class="cx">  protected $user_ids = array();
</span><del>-       protected $deprecated_functions = array( 'set_current_user' );
</del><span class="cx"> 
</span><span class="cx">  function setUp() {
</span><span class="cx">          parent::setUp();
</span><span class="lines">@@ -651,27 +650,6 @@
</span><span class="cx">  function test_current_user_can_for_blog() {
</span><span class="cx">          $user = new WP_User( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
</span><span class="cx">          $old_uid = get_current_user_id();
</span><del>-               set_current_user( $user->ID );
-
-               $this->assertTrue( current_user_can_for_blog( get_current_blog_id(), 'edit_posts' ) );
-               $this->assertFalse( current_user_can_for_blog( get_current_blog_id(), 'foo_the_bar' ) );
-               if ( ! is_multisite() ) {
-                       $this->assertTrue( current_user_can_for_blog( 12345, 'edit_posts' ) );
-                       return;
-               }
-
-               $this->assertFalse( current_user_can_for_blog( 12345, 'edit_posts' ) );
-
-               $blog_id = $this->factory->blog->create( array( 'user_id' => $user->ID ) );
-               $this->assertTrue( current_user_can_for_blog( $blog_id, 'edit_posts' ) );
-               $this->assertFalse( current_user_can_for_blog( $blog_id, 'foo_the_bar' ) );
-
-               set_current_user( $old_uid );
-       }
-
-       function test_wp_set_current_user() {
-               $user = new WP_User( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
-               $old_uid = get_current_user_id();
</del><span class="cx">           wp_set_current_user( $user->ID );
</span><span class="cx"> 
</span><span class="cx">          $this->assertTrue( current_user_can_for_blog( get_current_blog_id(), 'edit_posts' ) );
</span></span></pre></div>
<a id="trunktestsphpunittestsuserphp"></a>
<div class="modfile"><h4>Modified: trunk/tests/phpunit/tests/user.php (25408 => 25409)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/phpunit/tests/user.php       2013-09-12 18:37:00 UTC (rev 25408)
+++ trunk/tests/phpunit/tests/user.php  2013-09-12 18:37:32 UTC (rev 25409)
</span><span class="lines">@@ -6,25 +6,6 @@
</span><span class="cx">  */
</span><span class="cx"> class Tests_User extends WP_UnitTestCase {
</span><span class="cx"> 
</span><del>-       protected $_deprecated_errors = array();
-
-       function setUp() {
-               parent::setUp();
-               $this->_deprecated_errors = array();
-       }
-
-       public function deprecated_handler( $function, $message, $version ) {
-               $this->_deprecated_errors[] = array(
-                       'function' => $function,
-                       'message'  => $message,
-                       'version'  => $version
-               );
-       }
-
-       public function disable_deprecated_errors( $value ) {
-               return false;
-       }
-
</del><span class="cx">   function test_get_users_of_blog() {
</span><span class="cx">          // add one of each user role
</span><span class="cx">          $nusers = array();
</span><span class="lines">@@ -178,18 +159,26 @@
</span><span class="cx">          $user->customField = 123;
</span><span class="cx">          $this->assertEquals( $user->customField, 123 );
</span><span class="cx">          unset( $user->customField );
</span><del>-               $this->assertFalse( isset( $user->customField ) );
</del><ins>+                // $this->assertFalse( isset( $user->customField ) );
+               return $user;
+       }
</ins><span class="cx"> 
</span><ins>+       /**
+        * @depends test_user_unset
+        * @expectedDeprecated WP_User->id
+        * @ticket 20043
+        */
+       function test_user_unset_lowercase_id( $user ) {
</ins><span class="cx">           // Test 'id' (lowercase)
</span><del>-               add_action( 'deprecated_argument_run', array( $this, 'deprecated_handler' ), 10, 3 );
-               add_filter( 'deprecated_argument_trigger_error', array( $this, 'disable_deprecated_errors' ) );
</del><span class="cx">           unset( $user->id );
</span><del>-               $this->assertCount( 1, $this->_deprecated_errors );
-               $this->assertEquals( 'WP_User->id', $this->_deprecated_errors[0]['function'] );
-               $this->assertEquals( '2.1', $this->_deprecated_errors[0]['version'] );
-               remove_filter( 'deprecated_argument_trigger_error', array( $this, 'disable_deprecated_errors' ) );
-               remove_action( 'deprecated_argument_run', array( $this, 'deprecated_handler' ), 10, 3);
</del><ins>+                return $user;
+       }
</ins><span class="cx"> 
</span><ins>+       /**
+        * @depends test_user_unset_lowercase_id
+        * @ticket 20043
+        */
+       function test_user_unset_uppercase_id( $user ) {
</ins><span class="cx">           // Test 'ID'
</span><span class="cx">          $this->assertNotEmpty( $user->ID );
</span><span class="cx">          unset( $user->ID );
</span><span class="lines">@@ -210,16 +199,17 @@
</span><span class="cx">          $this->assertEquals( 'foo', $user->foo );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * @expectedDeprecated WP_User->id
+        */
</ins><span class="cx">   function test_id_property_back_compat() {
</span><span class="cx">          $user_id = $this->factory->user->create( array( 'role' => 'author' ) );
</span><span class="cx">          $user = new WP_User( $user_id );
</span><span class="cx"> 
</span><del>-               add_filter( 'deprecated_argument_trigger_error', array( $this, 'disable_deprecated_errors' ) );
</del><span class="cx">           $this->assertTrue( isset( $user->id ) );
</span><span class="cx">          $this->assertEquals( $user->ID, $user->id );
</span><span class="cx">          $user->id = 1234;
</span><span class="cx">          $this->assertEquals( $user->ID, $user->id );
</span><del>-               remove_filter( 'deprecated_argument_trigger_error', array( $this, 'disable_deprecated_errors' ) );
</del><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">  /**
</span></span></pre>
</div>
</div>

</body>
</html>