Codesleeve\Stapler\Factories\FileTest::it_should_be_able_to_build_a_stapler_uploaded_file_object_without_following_querystring_in_basename PHP Method

it_should_be_able_to_build_a_stapler_uploaded_file_object_without_following_querystring_in_basename() public method

Test that file created by file factory is not containing unnecessary quer string.
    public function it_should_be_able_to_build_a_stapler_uploaded_file_object_without_following_querystring_in_basename()
    {
        $url = 'https://graph.facebook.com/zuck/picture?type=large';
        $uploadedFile = File::create($url);
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_exec($ch);
        $info = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
        curl_close($ch);
        // To make sure that the exact image URL has query string
        $this->assertGreaterThanOrEqual(0, strpos($info, '?'));
        $this->assertFalse(strpos($uploadedFile->getFileName(), '?'));
    }