Skip to content

Commit

Permalink
Allow proxy tests to fail (#163)
Browse files Browse the repository at this point in the history
* allow proxy tests to fail

* wrong env

* fix indentation

* missing build

* fix style
  • Loading branch information
kunicmarko20 committed Dec 4, 2018
1 parent a1502c7 commit 957a318
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -42,6 +42,12 @@ matrix:
- php: 7.1
env: TARGET=phpstan LEVEL=7

- php: '7.2'
env: PHPUNIT_FLAGS="--group=proxy"

allow_failures:
- env: PHPUNIT_FLAGS="--group=proxy"

before_install:
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Expand Up @@ -15,6 +15,7 @@
<groups>
<exclude>
<group>installation</group>
<group>proxy</group>
</exclude>
</groups>

Expand Down
14 changes: 13 additions & 1 deletion tests/Installer/CKEditorInstallerTest.php
Expand Up @@ -39,7 +39,7 @@ protected function setUp(): void
{
$this->installer = new CKEditorInstaller();
$this->path = __DIR__.'/../../src/Resources/public';
$this->proxy = 'http://50.224.173.190:8080';
$this->proxy = 'http://184.105.143.66:3128';

$this->tearDown();
}
Expand Down Expand Up @@ -87,6 +87,9 @@ public function testInstallWithExcludes(): void
$this->assertInstall($options);
}

/**
* @group proxy
*/
public function testInstallWithHttpProxy(): void
{
putenv('http_proxy='.$this->proxy);
Expand All @@ -96,6 +99,9 @@ public function testInstallWithHttpProxy(): void
$this->assertInstall();
}

/**
* @group proxy
*/
public function testInstallWithHttpsProxy(): void
{
putenv('https_proxy='.$this->proxy);
Expand All @@ -105,6 +111,9 @@ public function testInstallWithHttpsProxy(): void
$this->assertInstall();
}

/**
* @group proxy
*/
public function testInstallWithHttpProxyRequestFullUri()
{
putenv('http_proxy='.$this->proxy);
Expand All @@ -118,6 +127,9 @@ public function testInstallWithHttpProxyRequestFullUri()
$this->assertInstall();
}

/**
* @group proxy
*/
public function testInstallWithHttpsProxyRequestFullUri(): void
{
putenv('https_proxy='.$this->proxy);
Expand Down

0 comments on commit 957a318

Please sign in to comment.