Performing it in one step?
```php
unset( $expectedData['path'], $expectedData['imageId'] );
```