Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
a97c45e0
Commit
a97c45e0
authored
Sep 15, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added session resolver tests.
parent
49c9094f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
container.php
laravel/config/container.php
+3
-3
SessionResolverTest.php
tests/Session/SessionResolverTest.php
+17
-0
No files found.
laravel/config/container.php
View file @
a97c45e0
...
@@ -221,11 +221,11 @@ return array(
...
@@ -221,11 +221,11 @@ return array(
'laravel.session.cookie'
=>
array
(
'resolver'
=>
function
(
$container
)
'laravel.session.cookie'
=>
array
(
'resolver'
=>
function
(
$container
)
{
{
$cookies
=
$container
->
resolve
(
'laravel.
request'
)
->
input
->
cookies
;
$cookies
=
$container
->
resolve
(
'laravel.
cookie'
)
;
$config
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session'
);
$config
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session'
);
return
new
Session\Drivers\Cookie
(
Security\Crypter
::
make
(
),
$cookies
);
return
new
Session\Drivers\Cookie
(
$container
->
resolve
(
'laravel.crypter'
),
$cookies
);
}),
}),
/*
/*
...
@@ -238,7 +238,7 @@ return array(
...
@@ -238,7 +238,7 @@ return array(
{
{
$table
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.table'
);
$table
=
$container
->
resolve
(
'laravel.config'
)
->
get
(
'session.table'
);
return
new
Session\Drivers\Database
(
$container
->
resolve
(
'laravel.database
.manager
'
)
->
connection
());
return
new
Session\Drivers\Database
(
$container
->
resolve
(
'laravel.database'
)
->
connection
());
}),
}),
/*
/*
...
...
tests/Session/SessionResolverTest.php
0 → 100644
View file @
a97c45e0
<?php
class
SessionResolverTest
extends
PHPUnit_Framework_TestCase
{
public
function
testDriversCanBeResolved
()
{
IoC
::
resolve
(
'laravel.config'
)
->
set
(
'application.key'
,
'something'
);
$this
->
assertInstanceOf
(
'Laravel\\Session\\Manager'
,
IoC
::
resolve
(
'laravel.session.manager'
));
$this
->
assertInstanceOf
(
'Laravel\\Session\\Drivers\\APC'
,
IoC
::
resolve
(
'laravel.session.apc'
));
$this
->
assertInstanceOf
(
'Laravel\\Session\\Drivers\\Cookie'
,
IoC
::
resolve
(
'laravel.session.cookie'
));
$this
->
assertInstanceOf
(
'Laravel\\Session\\Drivers\\Database'
,
IoC
::
resolve
(
'laravel.session.database'
));
$this
->
assertInstanceOf
(
'Laravel\\Session\\Drivers\\File'
,
IoC
::
resolve
(
'laravel.session.file'
));
$this
->
assertInstanceOf
(
'Laravel\\Session\\Drivers\\Memcached'
,
IoC
::
resolve
(
'laravel.session.memcached'
));
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment