Skip to content

Commit

Permalink
tests: set content url to example.com
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Sep 19, 2023
1 parent 08a2fc6 commit 4a05dd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/SimpleLocalAvatarsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function setUp(): void {
->andReturn( '/avatar.png' );

WP_Mock::userFunction( 'content_url' )
->andReturn( 'http://localhost/simple-local-avatar/wp-content' );
->andReturn( 'https://example.com/' );

WP_Mock::userFunction( 'admin_url' )
->with( 'options-discussion.php' )
Expand Down Expand Up @@ -207,13 +207,13 @@ public function test_get_simple_local_avatar_url_media_file_deleted() {
WP_Mock::userFunction( 'get_attached_file' )
->with( 102 )
->andReturn( false );

WP_Mock::userFunction( 'wp_get_attachment_image_url' )
->with( 102, 'full' )
->andReturn( false );

WP_Mock::userFunction( 'content_url' )
->andReturn( 'http://localhost/simple-local-avatar/wp-content' );
->andReturn( 'http://example.com' );

$this->assertEquals( '', $this->instance->get_simple_local_avatar_url( 2, 96 ) );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/multisite/SimpleLocalAvatarsNetworkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function test_get_simple_local_avatar_url() {
] );
WP_Mock::userFunction( 'content_url', [
'args' => [],
'return' => 'http://localhost/simple-local-avatar/wp-content',
'return' => 'http://example.com',
'times' => 1,
] );
WP_Mock::userFunction( 'get_option' )
Expand Down

0 comments on commit 4a05dd7

Please sign in to comment.