fix risky tests

This commit is contained in:
Christian Flothmann 2017-04-11 11:19:47 +02:00
parent b89ed60442
commit 86b685f617
4 changed files with 36 additions and 15 deletions

View File

@ -34,7 +34,7 @@ class LegacyTableHelperTest extends TestCase
}
/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRender($headers, $rows, $layout, $expected)
{
@ -50,7 +50,7 @@ class LegacyTableHelperTest extends TestCase
}
/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRenderAddRows($headers, $rows, $layout, $expected)
{
@ -66,7 +66,7 @@ class LegacyTableHelperTest extends TestCase
}
/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected)
{
@ -83,7 +83,7 @@ class LegacyTableHelperTest extends TestCase
$this->assertEquals($expected, $this->getOutputContent($output));
}
public function testRenderProvider()
public function renderProvider()
{
$books = array(
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),

View File

@ -452,6 +452,10 @@ class AutowirePassTest extends TestCase
$pass = new AutowirePass();
$pass->process($container);
$this->assertTrue($container->hasDefinition('deprecated'));
$this->assertTrue($container->hasDefinition('foo'));
$this->assertTrue($container->hasDefinition('bar'));
}
public function testEmptyStringIsKept()

View File

@ -153,6 +153,8 @@ class LocaleTest extends AbstractLocaleTest
public function testSetDefaultAcceptsEn()
{
$this->call('setDefault', 'en');
$this->assertSame('en', $this->call('getDefault'));
}
protected function call($methodName)

View File

@ -193,27 +193,42 @@ class InlineTest extends TestCase
/**
* @group legacy
* @dataProvider getReservedIndicators
* @expectedDeprecation Not quoting the scalar "@foo " starting with "@" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
public function testParseUnquotedScalarStartingWithReservedAtIndicator()
{
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
}
public function getReservedIndicators()
{
return array(array('@'), array('`'));
Inline::parse('{ foo: @foo }');
}
/**
* @group legacy
* @dataProvider getScalarIndicators
* @expectedDeprecation Not quoting the scalar "`foo " starting with "`" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
public function testParseUnquotedScalarStartingWithReservedBacktickIndicator()
{
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
Inline::parse('{ foo: `foo }');
}
/**
* @group legacy
* @expectedDeprecation Not quoting the scalar "|foo " starting with "|" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithLiteralStyleIndicator()
{
Inline::parse('{ foo: |foo }');
}
/**
* @group legacy
* @expectedDeprecation Not quoting the scalar ">foo " starting with ">" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.
* throws \Symfony\Component\Yaml\Exception\ParseException in 3.0
*/
public function testParseUnquotedScalarStartingWithFoldedStyleIndicator()
{
Inline::parse('{ foo: >foo }');
}
public function getScalarIndicators()