Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfde207

Browse files
Merge branch '3.4' into 4.0
* 3.4: [Form] Fix fixtures for forward compat [Lock] Fix SemaphoreStoreTest on OS X
2 parents 44b573f + 3384b2d commit cfde207

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

src/Symfony/Component/Form/Tests/Fixtures/Descriptor/default_option_with_normalizer.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (choice_translation_domain
1515
---------------- --------------------%s
1616
Allowed values - %s
1717
---------------- --------------------%s
18-
Normalizer Closure%s{ %s
18+
Normalizer Closure%s{%w
1919
parameters: 2 %s
20-
file: "%s%eExtension%eCore%eType%eChoiceType.php"
20+
file: "%s%eExtension%eCore%eType%eChoiceType.php"%w
2121
line: "%s to %s" %s
2222
} %s
2323
---------------- --------------------%s

src/Symfony/Component/Form/Tests/Fixtures/Descriptor/overridden_option_with_default_closures.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (empty_data)
88
Default Value: null %s
99
%s
1010
Closure(s): [ %s
11-
Closure%s{ %s
11+
Closure%s{%w
1212
parameters: 1 %s
13-
file: "%s%eExtension%eCore%eType%eFormType.php"
13+
file: "%s%eExtension%eCore%eType%eFormType.php"%w
1414
line: "%s to %s" %s
1515
}, %s
16-
Closure%s{ %s
16+
Closure%s{%w
1717
parameters: 2 %s
18-
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"
18+
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w
1919
line: "%s to %s" %s
2020
} %s
2121
] %s

src/Symfony/Component/Form/Tests/Fixtures/Descriptor/required_option_with_allowed_values.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (foo)
1616
"baz" %s
1717
] %s
1818
---------------- --------------------%s
19-
Normalizer Closure%s{ %s
19+
Normalizer Closure%s{%w
2020
parameters: 2 %s
21-
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"
21+
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w
2222
line: "%s to %s" %s
2323
} %s
2424
---------------- --------------------%s

src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,22 @@ public function testResourceRemoval()
4646

4747
private function getOpenedSemaphores()
4848
{
49+
if ('Darwin' === PHP_OS) {
50+
$lines = explode(PHP_EOL, trim(`ipcs -s`));
51+
if (-1 === $start = array_search('Semaphores:', $lines)) {
52+
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore list, got '.implode(PHP_EOL, $lines));
53+
}
54+
55+
return \count(\array_slice($lines, ++$start));
56+
}
57+
4958
$lines = explode(PHP_EOL, trim(`LC_ALL=C ipcs -su`));
5059
if ('------ Semaphore Status --------' !== $lines[0]) {
51-
throw new \Exception('Failed to extract list of opend semaphores. Expect a Semaphore status, got '.implode(PHP_EOL, $lines));
60+
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore status, got '.implode(PHP_EOL, $lines));
5261
}
5362
list($key, $value) = explode(' = ', $lines[1]);
5463
if ('used arrays' !== $key) {
55-
throw new \Exception('Failed to extract list of opend semaphores. Expect a used arrays key, got '.implode(PHP_EOL, $lines));
64+
throw new \Exception('Failed to extract list of opened semaphores. Expected a "used arrays" key, got '.implode(PHP_EOL, $lines));
5665
}
5766

5867
return (int) $value;

0 commit comments

Comments
 (0)