/** * Verify that using the CAS_ProxyChain will allow regex modifiers * * @return void */ public function testRegexModifiers() { $this->object->allowProxyChain(new CAS_ProxyChain(array('/^https?:\\/\\/service1\\.EXAMPLE\\.com\\/.*/i', '/^http:\\/\\/serVice[0-9]\\.example\\.com\\/[^\\/]+\\/path/ix'))); $this->assertTrue($this->object->isProxyListAllowed($this->list_size_0), 'Should be ok with no proxies in front.'); $this->assertFalse($this->object->isProxyListAllowed($this->list_size_1), 'Should not allow inexact matches in length.'); $this->assertTrue($this->object->isProxyListAllowed($this->list_size_2), 'Should allow modifiers on Regular expressions'); $this->assertFalse($this->object->isProxyListAllowed($this->list_size_3), 'Should not allow inexact matches in length.'); $this->assertFalse($this->object->isProxyListAllowed($this->list_size_4), 'Should not allow inexact matches in length.'); }