FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
BookStackApp-BookStack/tests/SessionTest.php at master · OneToolsCollection/BookStackApp-BookStack · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
OneToolsCollection
/
BookStackApp-BookStack
Public
forked from
BookStackApp/BookStack
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
BookStackApp-BookStack
/
tests
/
SessionTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (41 loc) · 1.53 KB
Breadcrumbs
BookStackApp-BookStack
/
tests
/
SessionTest.php
Copy path
File metadata and controls
53 lines (41 loc) · 1.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace
Tests
;
class
SessionTest
extends
TestCase
{
public
function
test_secure_images_not_tracked_in_session_history
()
{
config
()->
set
(
'
filesystems.images
'
,
'
local_secure
'
);
$
this
->
asEditor
();
$
page
=
$
this
->
entities
->
page
();
$
result
=
$
this
->
files
->
uploadGalleryImageToPage
(
$
this
,
$
page
);
$
expectedPath
=
storage_path
(
$
result
[
'
path
'
]);
$
this
->
assertFileExists
(
$
expectedPath
);
$
this
->
get
(
'
/books
'
);
$
this
->
assertEquals
(
url
(
'
/books
'
),
session
()->
previousUrl
());
$
resp
=
$
this
->
get
(
$
result
[
'
path
'
]);
$
resp
->
assertOk
();
$
resp
->
assertHeader
(
'
Content-Type
'
,
'
image/png
'
);
$
this
->
assertEquals
(
url
(
'
/books
'
),
session
()->
previousUrl
());
if
(
file_exists
(
$
expectedPath
)) {
unlink
(
$
expectedPath
);
}
}
public
function
test_pwa_manifest_is_not_tracked_in_session_history
()
{
$
this
->
asEditor
()->
get
(
'
/books
'
);
$
this
->
get
(
'
/manifest.json
'
);
$
this
->
assertEquals
(
url
(
'
/books
'
),
session
()->
previousUrl
());
}
public
function
test_dist_dir_access_is_not_tracked_in_session_history
()
{
$
this
->
asEditor
()->
get
(
'
/books
'
);
$
this
->
get
(
'
/dist/sub/hello.txt
'
);
$
this
->
assertEquals
(
url
(
'
/books
'
),
session
()->
previousUrl
());
}
public
function
test_opensearch_is_not_tracked_in_session_history
()
{
$
this
->
asEditor
()->
get
(
'
/books
'
);
$
this
->
get
(
'
/opensearch.xml
'
);
$
this
->
assertEquals
(
url
(
'
/books
'
),
session
()->
previousUrl
());
}
}
Back
|
FazBrowse Home
|
New Git URL