Stub tests for Check::File

This commit is contained in:
Clemens Schwaighofer
2021-11-02 09:33:04 +09:00
parent 08bbc913a9
commit 0f38cb4f89

View File

@@ -8,32 +8,81 @@ use PHPUnit\Framework\TestCase;
/** /**
* Undocumented class * Undocumented class
* @testdox CoreLibs\Convert\Math method tests * @testdox CoreLibs\Check\File method tests
*/ */
final class CoreLibsCheckFileTest extends TestCase final class CoreLibsCheckFileTest extends TestCase
{ {
/** @var array<mixed> */
private $files = [];
protected function setUp(): void protected function setUp(): void
{ {
// write a dummy file for testing // write a dummy files for testing
} }
protected function tearDown(): void protected function tearDown(): void
{ {
// unlink file // unlink files
} }
public function testGetFilenameEnding(string $input, string $expected): void /**
* main file list + data provider
*
* @return array
*/
public function filesList(): array
{
return [
['filename.txt', 'txt', 5]
];
}
public function filesExtensionProvider(): array
{
$list = [];
foreach ($this->filesList as $row) {
$list[$row[0] . ' must be extension ' . $row[1]] = [$row[0], $row[1]];
}
return $list;
}
/**
* Undocumented function
*
* @#dataProvider filesExtensionProvider
* @#testdox File::getFilenameEnding Input $input must be $expected
* //string $input, string $expected
*
* @param string $input
* @param string $expected
* @return void
*/
public function testGetFilenameEnding(): void
{ {
// getFilenameEnding // getFilenameEnding
$this->assertEquals( /* $this->assertEquals(
$expected, $expected,
\CoreLibs\Check\File::getFilenameEnding($input) \CoreLibs\Check\File::getFilenameEnding($input)
); */
$this->assertTrue(true, 'This should already work.');
$this->markTestIncomplete(
'testGetFilenameEnding has not been implemented yet.'
); );
} }
/**
* Undocumented function
* // string $input, string $expected
*
* @return void
*/
public function testGetLinesFromFile(): void public function testGetLinesFromFile(): void
{ {
// getLinesFromFile // getLinesFromFile
$this->assertTrue(true, 'This should already work.');
$this->markTestIncomplete(
'testGetLinesFromFile has not been implemented yet.'
);
} }
} }