Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-eugone committed Jun 7, 2016
1 parent 4570554 commit b4784e6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Tests/EventListener/RouteAnnotationEventListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,20 @@ public function testNoAnnotation()
}

/**
* test "sitemap"=false annotation
* test "sitemap"="anything" annotation
*/
public function testInvalidSitemapFalse()
public function testInvalidSitemapArbitrary()
{
$this->setExpectedException('InvalidArgumentException');
$this->assertEquals(-1, $this->getListener()->getOptions('route1', $this->getRoute(false)), 'sitemap = false throws an exception');
$this->assertEquals(-1, $this->getListener()->getOptions('route1', $this->getRoute('anything')), 'sitemap = "anything" throws an exception');
}

/**
* test "sitemap"="anything" annotation
* test "sitemap"=false annotation
*/
public function testInvalidSitemapArbitrary()
public function testSitemapFalse()
{
$this->setExpectedException('InvalidArgumentException');
$this->assertEquals(-1, $this->getListener()->getOptions('route1', $this->getRoute('anything')), 'sitemap = "anything" throws an exception');
$this->assertNull($this->getListener()->getOptions('route1', $this->getRoute(false)), 'sitemap = false returns null');
}

/**
Expand Down

0 comments on commit b4784e6

Please sign in to comment.