Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -11,10 +11,12 @@
namespace Symfony\Component\Routing\Tests;
use Symfony\Component\Routing\Router;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Router;
class RouterTest extends \PHPUnit_Framework_TestCase
class RouterTest extends TestCase
{
private $router = null;
@@ -22,7 +24,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
$this->loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
$this->loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
$this->router = new Router($this->loader, 'routing.yml');
}
@@ -82,7 +84,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
{
$this->router->setOption('resource_type', 'ResourceType');
$routeCollection = $this->getMock('Symfony\Component\Routing\RouteCollection');
$routeCollection = new RouteCollection();
$this->loader->expects($this->once())
->method('load')->with('routing.yml', 'ResourceType')
@@ -100,7 +102,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
$this->loader->expects($this->once())
->method('load')->with('routing.yml', null)
->will($this->returnValue($this->getMock('Symfony\Component\Routing\RouteCollection')));
->will($this->returnValue(new RouteCollection()));
$this->assertInstanceOf('Symfony\\Component\\Routing\\Matcher\\UrlMatcher', $this->router->getMatcher());
}
@@ -122,7 +124,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
$this->loader->expects($this->once())
->method('load')->with('routing.yml', null)
->will($this->returnValue($this->getMock('Symfony\Component\Routing\RouteCollection')));
->will($this->returnValue(new RouteCollection()));
$this->assertInstanceOf('Symfony\\Component\\Routing\\Generator\\UrlGenerator', $this->router->getGenerator());
}
@@ -137,7 +139,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
public function testMatchRequestWithUrlMatcherInterface()
{
$matcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface');
$matcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock();
$matcher->expects($this->once())->method('match');
$p = new \ReflectionProperty($this->router, 'matcher');
@@ -149,7 +151,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
public function testMatchRequestWithRequestMatcherInterface()
{
$matcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface');
$matcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock();
$matcher->expects($this->once())->method('matchRequest');
$p = new \ReflectionProperty($this->router, 'matcher');