Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  fix compatibility with Twig 3.10
  [Strings][EnglishInflector] Fix incorrect pluralisation of 'Album'
  handle union and intersection types for cascaded validations
  move wiring of the property info extractor to the ObjectNormalizer
  restore deprecated properties
  move Process component dep to require-dev
  Remove calls to `onConsecutiveCalls()`
  fix: remove unwanted type cast
  accept AbstractAsset instances when filtering schemas
  better distinguish URL schemes and windows drive letters
  handle edge cases when constructing constraints with named arguments
  convert empty CSV header names into numeric keys
  • Loading branch information
derrabus committed May 2, 2024
2 parents f66f908 + 2b304b6 commit 45506f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 9 additions & 7 deletions Tests/Loader/FileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ public function testImportWithFileLocatorDelegation()
$locatorMock = $this->createMock(FileLocatorInterface::class);

$locatorMockForAdditionalLoader = $this->createMock(FileLocatorInterface::class);
$locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls(
['path/to/file1'], // Default
['path/to/file1', 'path/to/file2'], // First is imported
['path/to/file1', 'path/to/file2'], // Second is imported
['path/to/file1'], // Exception
['path/to/file1', 'path/to/file2'] // Exception
));
$locatorMockForAdditionalLoader->expects($this->any())
->method('locate')
->willReturn(
['path/to/file1'],
['path/to/file1', 'path/to/file2'],
['path/to/file1', 'path/to/file2'],
['path/to/file1'],
['path/to/file1', 'path/to/file2']
);

$fileLoader = new TestFileLoader($locatorMock);
$fileLoader->setSupports(false);
Expand Down
3 changes: 2 additions & 1 deletion Tests/Util/XmlUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public function testLoadFile()
}

$mock = $this->createMock(Validator::class);
$mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true));
$mock->expects($this->exactly(2))->method('validate')
->willReturn(false, true);

try {
XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']);
Expand Down

0 comments on commit 45506f6

Please sign in to comment.