Merge branch '3.2'
* 3.2: [Console] Fix render exception test [Workflow] fix risky tests
This commit is contained in:
commit
e47a50b7b2
@ -638,11 +638,9 @@ class ApplicationTest extends TestCase
|
||||
|
||||
public function testRenderExceptionEscapesLines()
|
||||
{
|
||||
$application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock();
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false);
|
||||
$application->expects($this->any())
|
||||
->method('getTerminalWidth')
|
||||
->will($this->returnValue(22));
|
||||
putenv('COLUMNS=22');
|
||||
$application->register('foo')->setCode(function () {
|
||||
throw new \Exception('dont break here <info>!</info>');
|
||||
});
|
||||
@ -650,6 +648,7 @@ class ApplicationTest extends TestCase
|
||||
|
||||
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting');
|
||||
putenv('COLUMNS=120');
|
||||
}
|
||||
|
||||
public function testRun()
|
||||
|
@ -94,6 +94,9 @@ class StateMachineValidatorTest extends TestCase
|
||||
|
||||
(new StateMachineValidator())->validate($definition, 'foo');
|
||||
|
||||
// the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions)
|
||||
$this->addToAssertionCount(1);
|
||||
|
||||
// The graph looks like:
|
||||
//
|
||||
// +----+ +----+ +---+
|
||||
|
@ -28,6 +28,9 @@ class WorkflowValidatorTest extends TestCase
|
||||
$definition = $this->createSimpleWorkflowDefinition();
|
||||
|
||||
(new WorkflowValidator(true))->validate($definition, 'foo');
|
||||
|
||||
// the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions)
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,5 +63,8 @@ class WorkflowValidatorTest extends TestCase
|
||||
$definition = new Definition($places, $transitions);
|
||||
|
||||
(new WorkflowValidator())->validate($definition, 'foo');
|
||||
|
||||
// the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions)
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user