Browse files

[Console] Add failing test to demonstrate issue #7234

  • Loading branch information...
1 parent 9c46043 commit cd0c55cb8fb41318e4c31848aaab0bad8b078869 @Seldaek committed Apr 7, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/Symfony/Component/Console/Tests/ApplicationTest.php
View
10 src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -345,6 +345,16 @@ public function testFindAlternativeNamespace()
}
}
+ public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces()
+ {
+ $application = $this->getMock('Symfony\Component\Console\Application', array('getNamespaces'));
+ $application->expects($this->once())
+ ->method('getNamespaces')
+ ->will($this->returnValue(array('foo:sublong', 'bar:sub')));
+
+ $this->assertEquals('foo:sublong', $application->findNamespace('f:sub'));
+ }
+
public function testSetCatchExceptions()
{
$application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));

0 comments on commit cd0c55c

Please sign in to comment.