Skip to content

Commit a1f6870

Browse files
Merge branch '4.3' into 4.4
* 4.3: Disable phpunit typehint patch on 4.3 branch Fix deprecation on 4.3
2 parents cfa0b11 + 16c639c commit a1f6870

File tree

7 files changed

+26
-27
lines changed

7 files changed

+26
-27
lines changed

Tests/ConfigCacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ class ConfigCacheTest extends TestCase
1919
{
2020
private $cacheFile = null;
2121

22-
protected function setUp()
22+
protected function setUp(): void
2323
{
2424
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
2525
}
2626

27-
protected function tearDown()
27+
protected function tearDown(): void
2828
{
2929
$files = [$this->cacheFile, $this->cacheFile.'.meta'];
3030

Tests/Definition/Builder/NodeDefinitionTest.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,25 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1616
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
17-
use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
1817

1918
class NodeDefinitionTest extends TestCase
2019
{
21-
public function testDefaultPathSeparatorIsDot()
22-
{
23-
$node = $this->getMockForAbstractClass(NodeDefinition::class, ['foo']);
24-
25-
$this->assertAttributeSame('.', 'pathSeparator', $node);
26-
}
27-
2820
public function testSetPathSeparatorChangesChildren()
2921
{
30-
$node = new ArrayNodeDefinition('foo');
31-
$scalar = new ScalarNodeDefinition('bar');
32-
$node->append($scalar);
33-
34-
$node->setPathSeparator('/');
35-
36-
$this->assertAttributeSame('/', 'pathSeparator', $node);
37-
$this->assertAttributeSame('/', 'pathSeparator', $scalar);
22+
$parentNode = new ArrayNodeDefinition('name');
23+
$childNode = $this->createMock(NodeDefinition::class);
24+
25+
$childNode
26+
->expects($this->once())
27+
->method('setPathSeparator')
28+
->with('/');
29+
$childNode
30+
->expects($this->once())
31+
->method('setParent')
32+
->with($parentNode)
33+
->willReturn($childNode);
34+
$parentNode->append($childNode);
35+
36+
$parentNode->setPathSeparator('/');
3837
}
3938
}

Tests/Resource/DirectoryResourceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DirectoryResourceTest extends TestCase
1818
{
1919
protected $directory;
2020

21-
protected function setUp()
21+
protected function setUp(): void
2222
{
2323
$this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator';
2424
if (!file_exists($this->directory)) {
@@ -27,7 +27,7 @@ protected function setUp()
2727
touch($this->directory.'/tmp.xml');
2828
}
2929

30-
protected function tearDown()
30+
protected function tearDown(): void
3131
{
3232
if (!is_dir($this->directory)) {
3333
return;

Tests/Resource/FileExistenceResourceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class FileExistenceResourceTest extends TestCase
2020
protected $file;
2121
protected $time;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->file = realpath(sys_get_temp_dir()).'/tmp.xml';
2626
$this->time = time();
2727
$this->resource = new FileExistenceResource($this->file);
2828
}
2929

30-
protected function tearDown()
30+
protected function tearDown(): void
3131
{
3232
if (file_exists($this->file)) {
3333
unlink($this->file);

Tests/Resource/FileResourceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ class FileResourceTest extends TestCase
2020
protected $file;
2121
protected $time;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->file = sys_get_temp_dir().'/tmp.xml';
2626
$this->time = time();
2727
touch($this->file, $this->time);
2828
$this->resource = new FileResource($this->file);
2929
}
3030

31-
protected function tearDown()
31+
protected function tearDown(): void
3232
{
3333
if (!file_exists($this->file)) {
3434
return;

Tests/Resource/GlobResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class GlobResourceTest extends TestCase
1818
{
19-
protected function tearDown()
19+
protected function tearDown(): void
2020
{
2121
$dir = \dirname(__DIR__).'/Fixtures';
2222
@rmdir($dir.'/TmpGlob');

Tests/ResourceCheckerConfigCacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class ResourceCheckerConfigCacheTest extends TestCase
2020
{
2121
private $cacheFile = null;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
2626
}
2727

28-
protected function tearDown()
28+
protected function tearDown(): void
2929
{
3030
$files = [$this->cacheFile, "{$this->cacheFile}.meta"];
3131

0 commit comments

Comments
 (0)