Changeset 56680 for trunk/tests/phpunit/tests/vars.php
- Timestamp:
- 09/25/2023 03:34:34 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/vars.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/vars.php
r56638 r56680 35 35 * @return array 36 36 */ 37 function get_data_to_test_wp_is_mobile(): array {37 public function get_data_to_test_wp_is_mobile(): array { 38 38 return array( 39 39 'mobile client hint' => array( … … 105 105 106 106 /** 107 * Tests that wp_is_mobile() .108 *109 107 * @ticket 59370 110 108 * … … 116 114 * @param bool $expected Whether expected. 117 115 */ 118 function test_wp_is_mobile( array $headers, bool $expected ) {116 public function test_wp_is_mobile( array $headers, bool $expected ) { 119 117 foreach ( $headers as $key => $value ) { 120 118 $_SERVER[ $key ] = $value; … … 128 126 * @covers ::wp_is_mobile 129 127 */ 130 function test_wp_is_mobile_is_true_with_filter() {128 public function test_wp_is_mobile_is_true_with_filter() { 131 129 $this->assertFalse( wp_is_mobile() ); 132 130 add_filter( 'wp_is_mobile', '__return_true' ); … … 139 137 * @covers ::wp_is_mobile 140 138 */ 141 function test_wp_is_mobile_is_false_with_filter() {139 public function test_wp_is_mobile_is_false_with_filter() { 142 140 $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.60 Mobile Safari/537.36'; 143 141 $this->assertTrue( wp_is_mobile() );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)