Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.2'

* 2.2:
  bumped Symfony version to 2.1.11-DEV
  updated VERSION for 2.1.10
  update CONTRIBUTORS for 2.1.10
  updated CHANGELOG for 2.1.10
  fixed CS
  [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI
  [Filesystem] Fix regression introduced in 10dea948

Conflicts:
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
  • Loading branch information...
commit bb721b29e033594512f8b08386e13593b0faaf0f 2 parents 9b6fe3a + 6056d02
@fabpot fabpot authored
View
13 Tests/AbstractProcessTest.php
@@ -85,18 +85,21 @@ public function testProcessResponses($expected, $getter, $code)
*
* @dataProvider pipesCodeProvider
*/
- public function testProcessPipes($expected, $code)
+ public function testProcessPipes($code, $size)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 and https://bugs.php.net/bug.php?id=51800');
}
+ $expected = str_repeat(str_repeat('*', 1024), $size) . '!';
+ $expectedLength = (1024 * $size) + 1;
+
$p = $this->getProcess(sprintf('php -r %s', escapeshellarg($code)));
$p->setStdin($expected);
$p->run();
- $this->assertSame($expected, $p->getOutput());
- $this->assertSame($expected, $p->getErrorOutput());
+ $this->assertEquals($expectedLength, strlen($p->getOutput()));
+ $this->assertEquals($expectedLength, strlen($p->getErrorOutput()));
}
public function chainedCommandsOutputProvider()
@@ -524,13 +527,11 @@ public function pipesCodeProvider()
'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);',
'include \''.__DIR__.'/ProcessTestHelper.php\';',
);
- $baseData = str_repeat('*', 1024);
$codes = array();
foreach (array(1, 16, 64, 1024, 4096) as $size) {
- $data = str_repeat($baseData, $size).'!';
foreach ($variations as $code) {
- $codes[] = array($data, $code);
+ $codes[] = array($code, $size);
}
}
View
1  Tests/PhpProcessTest.php
@@ -15,7 +15,6 @@
class PhpProcessTest extends \PHPUnit_Framework_TestCase
{
-
public function testNonBlockingWorks()
{
$expected = 'hello world!';
View
20 Tests/ProcessBuilderTest.php
@@ -15,10 +15,7 @@
class ProcessBuilderTest extends \PHPUnit_Framework_TestCase
{
- /**
- * @test
- */
- public function shouldInheritEnvironmentVars()
+ public function testInheritEnvironmentVars()
{
$snapshot = $_ENV;
$_ENV = $expected = array('foo' => 'bar');
@@ -32,10 +29,7 @@ public function shouldInheritEnvironmentVars()
$_ENV = $snapshot;
}
- /**
- * @test
- */
- public function shouldInheritAndOverrideEnvironmentVars()
+ public function testProcessShouldInheritAndOverrideEnvironmentVars()
{
$snapshot = $_ENV;
$_ENV = array('foo' => 'bar', 'bar' => 'baz');
@@ -51,10 +45,7 @@ public function shouldInheritAndOverrideEnvironmentVars()
$_ENV = $snapshot;
}
- /**
- * @test
- */
- public function shouldInheritEnvironmentVarsByDefault()
+ public function testInheritEnvironmentVarsByDefault()
{
$pb = new ProcessBuilder();
$proc = $pb->add('foo')->getProcess();
@@ -62,10 +53,7 @@ public function shouldInheritEnvironmentVarsByDefault()
$this->assertNull($proc->getEnv());
}
- /**
- * @test
- */
- public function shouldNotReplaceExplicitlySetVars()
+ public function testNotReplaceExplicitlySetVars()
{
$snapshot = $_ENV;
$_ENV = array('foo' => 'bar');
View
3  Tests/ProcessFailedExceptionTest.php
@@ -36,7 +36,8 @@ public function testProcessFailedExceptionThrowsException()
'\InvalidArgumentException',
'Expected a failed process, but the given process was successful.'
);
- $exception = new ProcessFailedException($process);
+
+ new ProcessFailedException($process);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.