コード例 #1
0
 public function testIsCandidate()
 {
     $candidates = new PrefixCandidates(array('/routes'));
     $this->assertTrue($candidates->isCandidate('/routes'));
     $this->assertTrue($candidates->isCandidate('/routes/my/path'));
     $this->assertFalse($candidates->isCandidate('/other/my/path'));
     $this->assertFalse($candidates->isCandidate('/route'));
     $this->assertFalse($candidates->isCandidate('/routesnotsame'));
 }