commit
86832de708
3 files changed
+21
-20
No files matched your search
+8
-7
@@ -19,14 +19,14 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6.4",
|
||||
"illuminate/http": "5.3.*",
|
||||
"illuminate/routing": "5.3.*",
|
||||
"illuminate/session": "5.3.*",
|
||||
"illuminate/support": "5.3.*",
|
||||
"illuminate/view": "5.3.*"
|
||||
"illuminate/http": "5.4.*",
|
||||
"illuminate/routing": "5.4.*",
|
||||
"illuminate/session": "5.4.*",
|
||||
"illuminate/support": "5.4.*",
|
||||
"illuminate/view": "5.4.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/database": "5.3.*",
|
||||
"illuminate/database": "5.4.*",
|
||||
"mockery/mockery": "~0.9.4",
|
||||
"phpunit/phpunit": "~5.4"
|
||||
},
|
||||
@@ -37,5 +37,6 @@
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
+5
-5
@@ -7,7 +7,7 @@ use BadMethodCallException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Session\SessionInterface;
|
||||
use Illuminate\Contracts\Session\Session;
|
||||
use Illuminate\Support\Traits\Macroable;
|
||||
use Illuminate\Contracts\Routing\UrlGenerator;
|
||||
|
||||
@@ -49,7 +49,7 @@ class FormBuilder
|
||||
/**
|
||||
* The session store implementation.
|
||||
*
|
||||
* @var \Illuminate\Session\SessionInterface
|
||||
* @var \Illuminate\Contracts\Session\Session
|
||||
*/
|
||||
protected $session;
|
||||
|
||||
@@ -1164,7 +1164,7 @@ class FormBuilder
|
||||
/**
|
||||
* Get the session store implementation.
|
||||
*
|
||||
* @return \Illuminate\Session\SessionInterface $session
|
||||
* @return \Illuminate\Contracts\Session\Session $session
|
||||
*/
|
||||
public function getSessionStore()
|
||||
{
|
||||
@@ -1174,11 +1174,11 @@ class FormBuilder
|
||||
/**
|
||||
* Set the session store implementation.
|
||||
*
|
||||
* @param \Illuminate\Session\SessionInterface $session
|
||||
* @param \Illuminate\Contracts\Session\Session $session
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSessionStore(SessionInterface $session)
|
||||
public function setSessionStore(Session $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testPasswordsNotFilled()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
|
||||
$session->shouldReceive('getOldInput')->never();
|
||||
|
||||
@@ -89,7 +89,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFilesNotFilled()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
|
||||
$session->shouldReceive('getOldInput')->never();
|
||||
|
||||
@@ -113,7 +113,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFormTextRepopulation()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
$this->setModel($model = ['relation' => ['key' => 'attribute'], 'other' => 'val']);
|
||||
|
||||
$session->shouldReceive('getOldInput')->twice()->with('name_with_dots')->andReturn('some value');
|
||||
@@ -319,7 +319,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
public function testFormSelectRepopulation()
|
||||
{
|
||||
$list = ['L' => 'Large', 'M' => 'Medium', 'S' => 'Small'];
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
$this->setModel($model = ['size' => ['key' => 'S'], 'other' => 'val']);
|
||||
|
||||
$session->shouldReceive('getOldInput')->twice()->with('size')->andReturn('M');
|
||||
@@ -405,7 +405,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFormCheckbox()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
|
||||
$session->shouldReceive('getOldInput')->withNoArgs()->andReturn([]);
|
||||
$session->shouldReceive('getOldInput')->with('foo')->andReturn(null);
|
||||
@@ -423,7 +423,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFormCheckboxRepopulation()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
$session->shouldReceive('getOldInput')->withNoArgs()->andReturn([1]);
|
||||
|
||||
$session->shouldReceive('getOldInput')->once()->with('check')->andReturn(null);
|
||||
@@ -446,7 +446,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFormCheckboxWithModelRelation()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
$session->shouldReceive('getOldInput')->withNoArgs()->andReturn([]);
|
||||
$session->shouldReceive('getOldInput')->with('items')->andReturn(null);
|
||||
|
||||
@@ -491,7 +491,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testFormRadioRepopulation()
|
||||
{
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Session\Store'));
|
||||
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));
|
||||
|
||||
$session->shouldReceive('getOldInput')->with('radio')->andReturn(1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user