-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
112681c
commit 6a4e0a0
Showing
4 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Tests\SitemapPlugin\Exception; | ||
|
||
use SitemapPlugin\Exception\RouteExistsException; | ||
|
||
/** | ||
* @author Stefan Doorn <stefan@efectos.nl> | ||
*/ | ||
class RouteExistsExceptionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* | ||
*/ | ||
public function testException() | ||
{ | ||
$exception = new RouteExistsException('test'); | ||
$this->assertSame('Sitemap route "test" already exists, probably a provider with a non-unique name', $exception->getMessage()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Tests\SitemapPlugin\Exception; | ||
|
||
use SitemapPlugin\Exception\RouteExistsException; | ||
use SitemapPlugin\Exception\SitemapUrlNotFoundException; | ||
use SitemapPlugin\Model\SitemapUrl; | ||
|
||
/** | ||
* @author Stefan Doorn <stefan@efectos.nl> | ||
*/ | ||
class SitemapUrlNotFoundExceptionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* | ||
*/ | ||
public function testException() | ||
{ | ||
$sitemapUrl = new SitemapUrl(); | ||
$sitemapUrl->setLocalization('test'); | ||
|
||
$exception = new SitemapUrlNotFoundException($sitemapUrl); | ||
$this->assertSame('Sitemap url "test" not found', $exception->getMessage()); | ||
} | ||
} |