Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-blob-connector-filesystem-bundle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-blob-connector-filesystem-bundle
Commits
4689383d
Commit
4689383d
authored
2 years ago
by
Steinwender, Tamara
Browse files
Options
Downloads
Patches
Plain Diff
Adapt test
parent
e9e6c78b
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#207166
failed
2 years ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/Service/FilesystemServiceTest.php
+6
-1
6 additions, 1 deletion
tests/Service/FilesystemServiceTest.php
tests/Service/ShareLinkPersistenceServiceTest.php
+5
-1
5 additions, 1 deletion
tests/Service/ShareLinkPersistenceServiceTest.php
with
11 additions
and
2 deletions
tests/Service/FilesystemServiceTest.php
+
6
−
1
View file @
4689383d
...
...
@@ -12,8 +12,10 @@ use Dbp\Relay\BlobConnectorFilesystemBundle\Service\ConfigurationService;
use
Dbp\Relay\BlobConnectorFilesystemBundle\Service\FilesystemService
;
use
Dbp\Relay\BlobConnectorFilesystemBundle\Service\ShareLinkPersistenceService
;
use
Doctrine\ORM\EntityManager
;
use
Doctrine\ORM\EntityManagerInterface
;
use
Doctrine\ORM\Mapping\UnderscoreNamingStrategy
;
use
Doctrine\ORM\ORMSetup
;
use
Doctrine\Persistence\ManagerRegistry
;
use
Symfony\Bundle\FrameworkBundle\Test\WebTestCase
;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
use
Symfony\Component\String\Slugger\AsciiSlugger
;
...
...
@@ -53,7 +55,10 @@ class FilesystemServiceTest extends WebTestCase
file_data_identifier varchar(255) NOT NULL,
filesystem_path varchar(255) NOT NULL, PRIMARY KEY(identifier))'
);
$this
->
shareLinkPersistenceService
=
new
ShareLinkPersistenceService
(
$em
);
$managerRegistry
=
$this
->
createMock
(
ManagerRegistry
::
class
);
$managerRegistry
->
expects
(
$this
->
any
())
->
method
(
'getManager'
)
->
willReturn
(
$em
);
$this
->
shareLinkPersistenceService
=
new
ShareLinkPersistenceService
(
$managerRegistry
);
$config
=
[
'path'
=>
dirname
(
__FILE__
),
'link_url'
=>
'http://localhost:8000/'
,
'link_expire_time'
=>
'P7D'
];
$this
->
configurationService
=
new
ConfigurationService
();
...
...
This diff is collapsed.
Click to expand it.
tests/Service/ShareLinkPersistenceServiceTest.php
+
5
−
1
View file @
4689383d
...
...
@@ -9,6 +9,7 @@ use Dbp\Relay\BlobConnectorFilesystemBundle\Service\ShareLinkPersistenceService;
use
Doctrine\ORM\EntityManager
;
use
Doctrine\ORM\Mapping\UnderscoreNamingStrategy
;
use
Doctrine\ORM\ORMSetup
;
use
Doctrine\Persistence\ManagerRegistry
;
use
Symfony\Bundle\FrameworkBundle\Test\WebTestCase
;
use
Symfony\Component\Uid\Uuid
;
...
...
@@ -33,7 +34,10 @@ class ShareLinkPersistenceServiceTest extends WebTestCase
file_data_identifier varchar(255) NOT NULL,
filesystem_path varchar(255) NOT NULL, PRIMARY KEY(identifier))'
);
$this
->
api
=
new
ShareLinkPersistenceService
(
$em
);
$managerRegistry
=
$this
->
createMock
(
ManagerRegistry
::
class
);
$managerRegistry
->
expects
(
$this
->
any
())
->
method
(
'getManager'
)
->
willReturn
(
$em
);
$this
->
api
=
new
ShareLinkPersistenceService
(
$managerRegistry
);
}
public
function
testCreateShareLinkPersistence
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment