-
Notifications
You must be signed in to change notification settings - Fork 3
test enhancement #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @BenMorel, thank you for your reply. And I appreciate your code review!. I've almost pushed the latest commit for your recent request changes. If having any request changes, please write down the comments to let me know! Thanks. |
tests/FixedArrayTest.php
Outdated
| $fixedArray = FixedArray::fromArray($expectedArray); | ||
| $result = $fixedArray->toArray(); | ||
|
|
||
| $this->assertCount(4, $result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant test, covered by the next line. You can remove this line.
tests/Io/FileSystemTest.php
Outdated
| public function testCopyShouldThrowIOException() | ||
| { | ||
| FileSystem::write('./temp_lock_file', 'data'); | ||
| FileSystem::copy('./temp_lock_file', './non_existed_dir/temp_lock_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| public function testMoveShouldThrowIOException() | ||
| { | ||
| FileSystem::write('./temp_lock_file', 'data'); | ||
| FileSystem::move('./temp_lock_file', './non_existed_dir/temp_lock_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| */ | ||
| public function testDeleteShouldThrowIOException() | ||
| { | ||
| FileSystem::delete('./non_existed_dir/temp_lock_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| */ | ||
| public function testCreateDirectoryShouldThrowIOException() | ||
| { | ||
| FileSystem::createDirectory('./non_existed_dir/temp_lock_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| */ | ||
| public function testCreateLinkWithInvalidFileLink() | ||
| { | ||
| FileSystem::createLink('./invalid_link', './non_existed_dir/invalid_target'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| */ | ||
| public function testWriteWithInvalidFilePath() | ||
| { | ||
| FileSystem::write('./non_existed_dir/invalid_path', 'data'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
tests/Io/FileSystemTest.php
Outdated
| */ | ||
| public function testReadWithInvalidFilePath() | ||
| { | ||
| FileSystem::read('./non_existed_dir/invalid_path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be non_existing_dir
|
Filesystem tests are currently creating files/dirs in the current directory. At least all tests will start in a fresh environment, and the working directory will be kept clean. |
|
Hi @BenMorel, thank you for your reply. I think the I will follow your approach to complete the |
|
Sorry, I told you nonsense regarding Can you please revert the previous commit, but keep the data providers? |
b7f15b8 to
3520c0f
Compare
|
@BenMorel, I've removed prefixed Please review that. Thanks. |
|
Looks good now, please just remove all |
tests/Io/FileSystemTest.php
Outdated
| $this->file_put_contents('read.txt', 'read content'); | ||
|
|
||
| $this->assertSame('read content', FileSystem::read('read')); | ||
| $this->assertSame('read content', FileSystem::read('read.txt')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please remove all the .txt you added above? The add no value to the existing tests.
|
Hi @BenMorel, thank you for your reply. I've completely removed the |
|
All good now. Thanks! 👍 |
Changed log
ext-curlincomposer.jsonto check whether the curl extension is installed.