- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-themes-controller.php
r48758 r48937 79 79 80 80 $this->assertArrayHasKey( 'X-WP-Total', $headers ); 81 $this->assert Equals( 1, $headers['X-WP-Total'] );81 $this->assertSame( 1, $headers['X-WP-Total'] ); 82 82 $this->assertArrayHasKey( 'X-WP-TotalPages', $headers ); 83 $this->assert Equals( 1, $headers['X-WP-TotalPages'] );83 $this->assertSame( 1, $headers['X-WP-TotalPages'] ); 84 84 } 85 85 … … 147 147 $response = self::perform_active_theme_request(); 148 148 149 $this->assert Equals( 200, $response->get_status() );149 $this->assertSame( 200, $response->get_status() ); 150 150 $data = $response->get_data(); 151 151 … … 199 199 200 200 $response = self::perform_active_theme_request(); 201 $this->assert Equals( 200, $response->get_status() );201 $this->assertSame( 200, $response->get_status() ); 202 202 } 203 203 … … 209 209 public function test_prepare_item() { 210 210 $response = self::perform_active_theme_request(); 211 $this->assert Equals( 200, $response->get_status() );211 $this->assertSame( 200, $response->get_status() ); 212 212 $this->check_get_theme_response( $response ); 213 213 } … … 222 222 $data = $response->get_data(); 223 223 $properties = $data['schema']['properties']; 224 $this->assert Equals( 14, count( $properties ) );224 $this->assertSame( 14, count( $properties ) ); 225 225 226 226 $this->assertArrayHasKey( 'author', $properties ); … … 530 530 $result = $response->get_data(); 531 531 $this->assertArrayHasKey( 'theme_supports', $result[0] ); 532 $this->assert Equals( array( $wordpress_blue ), $result[0]['theme_supports']['editor-color-palette'] );532 $this->assertSame( array( $wordpress_blue ), $result[0]['theme_supports']['editor-color-palette'] ); 533 533 } 534 534 … … 575 575 remove_theme_support( 'custom-logo' ); 576 576 $wordpress_logo = array( 577 'width' => 400, 577 578 'height' => 100, 578 ' width' => 400,579 'flex-width' => true, 579 580 'flex-height' => true, 580 'flex-width' => true,581 581 'header-text' => array( 'site-title', 'site-description' ), 582 582 'unlink-homepage-logo' => false, … … 586 586 $result = $response->get_data(); 587 587 $this->assertArrayHasKey( 'theme_supports', $result[0] ); 588 $this->assert Equals( $wordpress_logo, $result[0]['theme_supports']['custom-logo'] );588 $this->assertSame( $wordpress_logo, $result[0]['theme_supports']['custom-logo'] ); 589 589 } 590 590 … … 634 634 635 635 $expected = array_diff_key( $wordpress_header, array_flip( $excluded ) ); 636 $this->assert Equals( $expected, $result[0]['theme_supports']['custom-header'] );636 $this->assertSame( $expected, $result[0]['theme_supports']['custom-header'] ); 637 637 } 638 638 … … 678 678 679 679 $expected = array_diff_key( $background, array_flip( $excluded ) ); 680 $this->assert Equals( $expected, $result[0]['theme_supports']['custom-background'] );680 $this->assertSame( $expected, $result[0]['theme_supports']['custom-background'] ); 681 681 } 682 682 … … 711 711 $result = $response->get_data(); 712 712 $this->assertArrayHasKey( 'theme_supports', $result[0] ); 713 $this->assert Equals( $html5, $result[0]['theme_supports']['html5'] );713 $this->assertSame( $html5, $result[0]['theme_supports']['html5'] ); 714 714 } 715 715 … … 896 896 $result = $response->get_data(); 897 897 $this->assertArrayHasKey( 'theme_supports', $result[0] ); 898 $this->assert Equals( array( $gradient ), $result[0]['theme_supports']['editor-gradient-presets'] );898 $this->assertSame( array( $gradient ), $result[0]['theme_supports']['editor-gradient-presets'] ); 899 899 } 900 900 … … 996 996 $result = $response->get_data(); 997 997 $this->assertTrue( isset( $result[0]['theme_supports'] ) ); 998 $this->assert Equals( array( 'post' ), $result[0]['theme_supports']['post-thumbnails'] );998 $this->assertSame( array( 'post' ), $result[0]['theme_supports']['post-thumbnails'] ); 999 999 } 1000 1000 … … 1022 1022 $result = $response->get_data(); 1023 1023 $this->assertTrue( isset( $result[0]['theme_supports'] ) ); 1024 $this->assert Equals( array( 'a', 'b', 'c' ), $result[0]['theme_supports']['test-feature'] );1024 $this->assertSame( array( 'a', 'b', 'c' ), $result[0]['theme_supports']['test-feature'] ); 1025 1025 } 1026 1026 … … 1050 1050 1051 1051 $this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] ); 1052 $this->assert Equals( $schema, $data['schema']['properties']['my_custom_int'] );1052 $this->assertSame( $schema, $data['schema']['properties']['my_custom_int'] ); 1053 1053 1054 1054 $response = self::perform_active_theme_request( 'GET' );
Note: See TracChangeset
for help on using the changeset viewer.