Skip to content

Commit

Permalink
wp-graphql#156 Cleaning up assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughdevore committed Oct 5, 2017
1 parent d9fb8b0 commit b11b2b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test-media-item-mutations.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public function testCreateMediaItemAttachToParent() {
$media_item_id = $actual["data"]["createMediaItem"]["mediaItem"]["id"];
$attachment_id = $actual["data"]["createMediaItem"]["mediaItem"]["mediaItemId"];
$attachment_url = wp_get_attachment_url( $attachment_id );
$attachment_file = str_replace( '/tmp/wordpress//wp-content/uploads/', '', get_attached_file( $attachment_id ) );
$attachment_file = str_replace( ['/tmp/wordpress//wp-content/uploads/', '/tmp/wordpress/wp-content/uploads/'], '', get_attached_file( $attachment_id ) );
$attachment_details = wp_get_attachment_metadata( $attachment_id );


Expand Down Expand Up @@ -621,7 +621,7 @@ public function testCreateMediaItemDefaultValues() {
$attachment_data = get_post( $attachment_id );
$attachment_title = $attachment_data->post_title;
$attachment_url = wp_get_attachment_url( $attachment_id );
$attachment_file = str_replace( '/tmp/wordpress//wp-content/uploads/', '', get_attached_file( $attachment_id ) );
$attachment_file = str_replace( ['/tmp/wordpress//wp-content/uploads/', '/tmp/wordpress/wp-content/uploads/'], '', get_attached_file( $attachment_id ) );
$attachment_details = wp_get_attachment_metadata( $attachment_id );

$expected = [
Expand Down Expand Up @@ -700,7 +700,7 @@ public function testCreateMediaItemMutation() {
$media_item_id = $actual["data"]["createMediaItem"]["mediaItem"]["id"];
$attachment_id = $actual["data"]["createMediaItem"]["mediaItem"]["mediaItemId"];
$attachment_url = wp_get_attachment_url( $attachment_id );
$attachment_file = str_replace( '/tmp/wordpress//wp-content/uploads/', '', get_attached_file( $attachment_id ) );
$attachment_file = str_replace( ['/tmp/wordpress//wp-content/uploads/', '/tmp/wordpress/wp-content/uploads/'], '', get_attached_file( $attachment_id ) );
$attachment_details = wp_get_attachment_metadata( $attachment_id );

$expected = [
Expand Down

0 comments on commit b11b2b7

Please sign in to comment.