Skip to content

Commit cb1384e

Browse files
committed
Fixes several tests in ApiTest that were broken by refactoring the API class
- Data for metadata is always retrieved recursively. - Marks Api::getCreatedTimestamp() as being used by Api::getRecursiveMetadata()
1 parent cd72e41 commit cb1384e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit-tests/ApiTest.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ final public function testApiShouldPassOnExceptionsWhenAskingInfoForFileCausesAn
264264
/**
265265
* @covers ::getRecursiveMetadata
266266
*
267+
* @uses Potherca\Flysystem\Github\Api::getCreatedTimestamp
268+
*
267269
* @dataProvider provideExpectedMetadata
268270
*
269271
* @param array $data
@@ -284,7 +286,7 @@ final public function testApiShouldRetrieveExpectedMetadataWhenAskedToGetRecursi
284286
$this->prepareMockApi(
285287
'show',
286288
$api::API_GIT_DATA,
287-
[$mockVendor, $mockPackage, $mockReference, $data['recursive']],
289+
[$mockVendor, $mockPackage, $mockReference, true],
288290
$this->getMockApiTreeResponse($data['truncated'], $api),
289291
Trees::class
290292
);
@@ -564,7 +566,7 @@ final public function provideExpectedMetadata()
564566
]
565567
],
566568
'recursive' => false,
567-
'truncated' => false
569+
'truncated' => false,
568570
]],
569571
'Filepath, recursive, not truncated' => [[
570572
'path' => self::MOCK_FILE_PATH,

0 commit comments

Comments
 (0)