Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae544cc

Browse files
committed
Fix tests
1 parent3a626e8 commitae544cc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

‎src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testUnusedBinding()
6868
publicfunctiontestMissingParent()
6969
{
7070
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
71-
$this->expectExceptionMessageRegExp('Unused binding "$quz" in service [\s\S]+ Invalid service ".*\\ParentNotExists": class NotExists not found\.');
71+
$this->expectExceptionMessageRegExp('/Unused binding "\$quz" in service [\s\S]+/');
7272
if (\PHP_VERSION_ID >=70400) {
7373
thrownewWarning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
7474
}

‎src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function testTagWithEmptyNameThrowsException()
311311
publicfunctiontestTagWithNonStringNameThrowsException()
312312
{
313313
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
314-
$this->expectExceptionMessageRegExp('The tag name for service "\.+" must be a non-empty string');
314+
$this->expectExceptionMessageRegExp('/The tag name for service ".+"in .+must be a non-empty string/');
315315
$loader =newYamlFileLoader(newContainerBuilder(),newFileLocator(self::$fixturesPath.'/yaml'));
316316
$loader->load('tag_name_no_string.yml');
317317
}

‎src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists()
191191

192192
publicfunctiontestSetValueFailsIfAdderAndRemoverExistButValueIsNotTraversable()
193193
{
194-
$this->expectException('Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException
195-
expectedExceptionMessageRegExp /The property "axes" in class "Mock_PropertyAccessorCollectionTest_Car[^"]*" can be defined with the methods "addAxis()", "removeAxis()" but the new value must be an array or an instance of \Traversable, "string" given./');
194+
$this->expectException('Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException');
195+
$this->expectExceptionMessage('Could not determine access type for property "axes" in class "Symfony\Component\PropertyAccess\Tests\PropertyAccessorCollectionTest_Car".');
196196
$car =newPropertyAccessorCollectionTest_Car();
197197

198198
$this->propertyAccessor->setValue($car,'axes','Not an array or Traversable');

‎src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function testDefaultRequirementOfVariableDisallowsNextSeparator()
339339

340340
publicfunctiontestSchemeRequirement()
341341
{
342-
$this->expectException('Symfony\Component\Routing\Exception\ResourceNotFoundException');
342+
$this->getExpectedException() ?:$this->expectException('Symfony\Component\Routing\Exception\ResourceNotFoundException');
343343
$coll =newRouteCollection();
344344
$coll->add('foo',newRoute('/foo', [], [], [],'', ['https']));
345345
$matcher =$this->getUrlMatcher($coll);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp