Ejemplo n.º 1
0
 public function testVerifyRedirectUriRegExp()
 {
     $clientData = new ClientData(array('id' => 'foo', 'redirect_uri' => 'https://www.example.org/callback/[0-9]+', 'name' => 'Foo', 'type' => 'code', 'secret' => 'foo'));
     $this->assertTrue($clientData->verifyRedirectUri('https://www.example.org/callback/[0-9]+'));
     $this->assertTrue($clientData->verifyRedirectUri('https://www.example.org/callback/55', true));
     $this->assertFalse($clientData->verifyRedirectUri('https://www.example.org/callback/a5', true));
 }