spec\Newscoop\Services\AttachmentServiceSpec::it_should_update_attachment PHP Method

it_should_update_attachment() public method

    public function it_should_update_attachment()
    {
        $filesystem = new Filesystem();
        $newFileName = __DIR__ . '/../../assets/images/temp-image.jpg';
        $filesystem->copy(__DIR__ . '/../../assets/images/picture.jpg', $newFileName);
        $uploadedFile = new UploadedFile($newFileName, 'temp-image.jpg', 'image/jpg', filesize($newFileName), null, true);
        $language = new Language();
        $attachment = new Attachment();
        $phraseId = 1;
        $description = new Translation($phraseId);
        $description->setLanguage($language);
        $description->setTranslationText('Description text');
        $attachment->setDescription($description);
        $this->upload($uploadedFile, 'Test file - updated', $language, array(), $attachment);
    }