"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

PhpGeneratorDumperTest.php  (phplist-3.4.5.tgz):PhpGeneratorDumperTest.php  (phplist-3.4.6.tgz)
skipping to change at line 118 skipping to change at line 118
$absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [ ], UrlGeneratorInterface::ABSOLUTE_URL); $absoluteUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [ ], UrlGeneratorInterface::ABSOLUTE_URL);
$relativeUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo ' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH); $relativeUrlWithParameter = $projectUrlGenerator->generate('Test', ['foo ' => 'bar'], UrlGeneratorInterface::ABSOLUTE_PATH);
$relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [ ], UrlGeneratorInterface::ABSOLUTE_PATH); $relativeUrlWithoutParameter = $projectUrlGenerator->generate('Test2', [ ], UrlGeneratorInterface::ABSOLUTE_PATH);
$this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrl WithParameter); $this->assertEquals('http://localhost/app.php/testing/bar', $absoluteUrl WithParameter);
$this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWit houtParameter); $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWit houtParameter);
$this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter); $this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter);
$this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter); $this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter);
} }
/**
* @expectedException \InvalidArgumentException
*/
public function testDumpWithoutRoutes() public function testDumpWithoutRoutes()
{ {
$this->expectException('InvalidArgumentException');
file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump([ 'class' => 'WithoutRoutesUrlGenerator'])); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump([ 'class' => 'WithoutRoutesUrlGenerator']));
include $this->testTmpFilepath; include $this->testTmpFilepath;
$projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext ('/app.php')); $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext ('/app.php'));
$projectUrlGenerator->generate('Test', []); $projectUrlGenerator->generate('Test', []);
} }
/**
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundExce
ption
*/
public function testGenerateNonExistingRoute() public function testGenerateNonExistingRoute()
{ {
$this->expectException('Symfony\Component\Routing\Exception\RouteNotFoun dException');
$this->routeCollection->add('Test', new Route('/test')); $this->routeCollection->add('Test', new Route('/test'));
file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump([ 'class' => 'NonExistingRoutesUrlGenerator'])); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump([ 'class' => 'NonExistingRoutesUrlGenerator']));
include $this->testTmpFilepath; include $this->testTmpFilepath;
$projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestCon text()); $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestCon text());
$url = $projectUrlGenerator->generate('NonExisting', []); $url = $projectUrlGenerator->generate('NonExisting', []);
} }
public function testDumpForRouteWithDefaults() public function testDumpForRouteWithDefaults()
 End of changes. 4 change blocks. 
7 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)