| | 108 | |
|---|
| | 109 | /** |
|---|
| | 110 | * assert that a non-existing but correct URL is treated correct |
|---|
| | 111 | */ |
|---|
| | 112 | public function testURLNotAvailable() |
|---|
| | 113 | { |
|---|
| | 114 | $this->assertFalse($this->httpURLFilter->isDNSCheckEnabled()); |
|---|
| | 115 | $this->assertEqual($this->httpURLFilter->execute('http://doesnotexist.1und1.de/'), 'http://doesnotexist.1und1.de/'); |
|---|
| | 116 | $this->httpURLFilter->setCheckDNS(true); |
|---|
| | 117 | $this->assertTrue($this->httpURLFilter->isDNSCheckEnabled()); |
|---|
| | 118 | if (DIRECTORY_SEPARATOR === '\\') { |
|---|
| | 119 | // Windows does not support dns checks, filter will always return ok |
|---|
| | 120 | $this->assertEqual($this->httpURLFilter->execute('http://doesnotexist.1und1.de/'), 'http://doesnotexist.1und1.de/'); |
|---|
| | 121 | } else { |
|---|
| | 122 | $this->mockStubRequestValueErrorFactory->expect('create', array('URL_NOT_AVAILABLE')); |
|---|
| | 123 | $this->expectException('stubFilterException'); |
|---|
| | 124 | $this->httpURLFilter->execute('http://doesnotexist.1und1.de/'); |
|---|
| | 125 | } |
|---|
| | 126 | } |
|---|