Changeset 48937 for trunk/tests/phpunit/tests/upload.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/upload.php
r48464 r48937 25 25 $subdir = gmstrftime( '/%Y/%m' ); 26 26 27 $this->assert Equals( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] );28 $this->assert Equals( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] );29 $this->assert Equals( $subdir, $info['subdir'] );30 $this->assert Equals( false,$info['error'] );27 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] ); 28 $this->assertSame( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] ); 29 $this->assertSame( $subdir, $info['subdir'] ); 30 $this->assertFalse( $info['error'] ); 31 31 } 32 32 … … 37 37 $subdir = gmstrftime( '/%Y/%m' ); 38 38 39 $this->assert Equals( get_option( 'siteurl' ) . '/foo/bar' . $subdir, $info['url'] );40 $this->assert Equals( ABSPATH . 'foo/bar' . $subdir, $info['path'] );41 $this->assert Equals( $subdir, $info['subdir'] );42 $this->assert Equals( false,$info['error'] );39 $this->assertSame( get_option( 'siteurl' ) . '/foo/bar' . $subdir, $info['url'] ); 40 $this->assertSame( ABSPATH . 'foo/bar' . $subdir, $info['path'] ); 41 $this->assertSame( $subdir, $info['subdir'] ); 42 $this->assertFalse( $info['error'] ); 43 43 } 44 44 … … 60 60 $subdir = gmstrftime( '/%Y/%m' ); 61 61 62 $this->assert Equals( '/baz' . $subdir, $info['url'] );63 $this->assert Equals( $path . $subdir, $info['path'] );64 $this->assert Equals( $subdir, $info['subdir'] );65 $this->assert Equals( false,$info['error'] );62 $this->assertSame( '/baz' . $subdir, $info['url'] ); 63 $this->assertSame( $path . $subdir, $info['path'] ); 64 $this->assertSame( $subdir, $info['subdir'] ); 65 $this->assertFalse( $info['error'] ); 66 66 } 67 67 … … 72 72 $info = _wp_upload_dir(); 73 73 74 $this->assert Equals( get_option( 'siteurl' ) . '/wp-content/uploads', $info['url'] );75 $this->assert Equals( ABSPATH . 'wp-content/uploads', $info['path'] );76 $this->assert Equals( '', $info['subdir'] );77 $this->assert Equals( false,$info['error'] );74 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/uploads', $info['url'] ); 75 $this->assertSame( ABSPATH . 'wp-content/uploads', $info['path'] ); 76 $this->assertSame( '', $info['subdir'] ); 77 $this->assertFalse( $info['error'] ); 78 78 } 79 79 … … 86 86 $subdir = gmstrftime( '/%Y/%m' ); 87 87 88 $this->assert Equals( 'http://' . WP_TESTS_DOMAIN . '/asdf' . $subdir, $info['url'] );89 $this->assert Equals( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] );90 $this->assert Equals( $subdir, $info['subdir'] );91 $this->assert Equals( false,$info['error'] );88 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/asdf' . $subdir, $info['url'] ); 89 $this->assertSame( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] ); 90 $this->assertSame( $subdir, $info['subdir'] ); 91 $this->assertFalse( $info['error'] ); 92 92 } 93 93 … … 101 101 $subdir = gmstrftime( '/%Y/%m' ); 102 102 103 $this->assert Equals( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] );104 $this->assert Equals( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] );105 $this->assert Equals( $subdir, $info['subdir'] );106 $this->assert Equals( false,$info['error'] );103 $this->assertSame( get_option( 'siteurl' ) . '/wp-content/uploads' . $subdir, $info['url'] ); 104 $this->assertSame( ABSPATH . 'wp-content/uploads' . $subdir, $info['path'] ); 105 $this->assertSame( $subdir, $info['subdir'] ); 106 $this->assertFalse( $info['error'] ); 107 107 } 108 108
Note: See TracChangeset
for help on using the changeset viewer.