init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
47
vendor/sensio/framework-extra-bundle/Tests/Configuration/RouteTest.php
vendored
Normal file
47
vendor/sensio/framework-extra-bundle/Tests/Configuration/RouteTest.php
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace Sensio\Bundle\FrameworkExtraBundle\Tests\Configuration;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
|
||||
/**
|
||||
* @author Iltar van der Berg <ivanderberg@hostnet.nl>
|
||||
*/
|
||||
class RouteTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testSetServiceWithoutPath()
|
||||
{
|
||||
$route = new Route(array());
|
||||
$this->assertNull($route->getPath());
|
||||
$this->assertNull($route->getService());
|
||||
|
||||
$route->setService('app.test');
|
||||
|
||||
$this->assertSame('', $route->getPath());
|
||||
$this->assertSame('app.test', $route->getService());
|
||||
}
|
||||
|
||||
public function testSetServiceWithPath()
|
||||
{
|
||||
$route = new Route(array());
|
||||
$this->assertNull($route->getPath());
|
||||
$this->assertNull($route->getService());
|
||||
|
||||
$route->setPath('/test/');
|
||||
$route->setService('app.test');
|
||||
|
||||
$this->assertSame('/test/', $route->getPath());
|
||||
$this->assertSame('app.test', $route->getService());
|
||||
}
|
||||
|
||||
public function testSettersViaConstruct()
|
||||
{
|
||||
$route = new Route(array('service' => 'app.test'));
|
||||
$this->assertSame('', $route->getPath());
|
||||
$this->assertSame('app.test', $route->getService());
|
||||
|
||||
$route = new Route(array('service' => 'app.test', 'path' => '/test/'));
|
||||
$this->assertSame('/test/', $route->getPath());
|
||||
$this->assertSame('app.test', $route->getService());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue