Skip to content

Commit

Permalink
Fix set upload dir test
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Sep 23, 2023
1 parent a46a5d9 commit 9a23c0f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions phpunit/tests/fonts/font-library/wpFontLibrary/setUploadDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ class Tests_Fonts_WpFontLibrary_SetUploadDir extends WP_UnitTestCase {
public function test_should_set_fonts_upload_dir() {
$defaults = array(
'subdir' => '/abc',
'basedir' => '/var/www/html/wp-content',
'baseurl' => 'http://example.com/wp-content',
'basedir' => '/any/path',
'baseurl' => 'http://example.com/an/arbitrary/url',
'path' => '/any/path/abc',
'url' => 'http://example.com/an/arbitrary/url/abc',
);
$expected = array(
'subdir' => '/fonts',
'basedir' => '/var/www/html/wp-content',
'basedir' => WP_CONTENT_DIR,
'baseurl' => content_url(),
'path' => '/var/www/html/wp-content/fonts',
'path' => path_join( WP_CONTENT_DIR, 'fonts' ),
'url' => content_url() . '/fonts',
);
$this->assertSame( $expected, WP_Font_Library::set_upload_dir( $defaults ) );
Expand Down

0 comments on commit 9a23c0f

Please sign in to comment.