Skip to content
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

String-based comparison of file structure tree #111

Closed
wants to merge 4 commits into from

Conversation

Projects
None yet
2 participants
@tot-ra
Copy link

commented Apr 13, 2015

Added vsfStreamAssertVisitor that allows to get tree structure of the filesystem as a string, that will be used in asserts/test comparisons. Includes file/dir distinction, chmod, depth. Doesn't use tabs/spaces, for example:

\=root @777
.\=library @777
..\=1 @777
...\=1 @777
....\=1 @777
.....\=f420b5caa94fb3ac74fe4fb602e38fe8 @755

Alternative to array-based comparison with vfsStreamPrintVisitor

tot-ra and others added some commits Apr 13, 2015

Create vfsStreamAssertVisitor.php
Allows to retrieve current structure state as a string variable
Artjom Kurapov
Added vsfStreamAssertVisitor that allows to get tree structure of the…
… filesystem as a string, that will be used in asserts/test comparisons. Includes file/dir distinction, chmod, depth. Doesn't use tabs/spaces
public function visitRecursiveDirectoryStructure() {
$root = vfsStream::setup('root',
null,
[

This comment has been minimized.

Copy link
@mikey179

mikey179 Apr 13, 2015

Member

vfsStream still supports PHP 5.3. Please don't use short array syntax.

* @since 0.10.0
* @see https://github.com/mikey179/vfsStream/issues/10
* @group issue_10
*/

This comment has been minimized.

Copy link
@mikey179

mikey179 Apr 13, 2015

Member

@since should feature the correct version when it was introduced. As this is a feature addition, the next possible version this could be introduced would be 1.6.0.

@mikey179

This comment has been minimized.

Copy link
Member

commented Apr 13, 2015

Thanks for this pull request, interesting idea.

As you might have seen from the test result, there is a typo in the filename: it should be vfsStreamAssertVisitorTestCase.php, not vsfStreamAssertVisitorTestCase.php. Also, the same for the class itself: vfsStreamAssertVisitor.php instead of vsfStreamAssertVisitor.php.

@mikey179

This comment has been minimized.

Copy link
Member

commented Apr 13, 2015

Just seen it: can you please submit this PR against branch master, not against branch linking?

@mikey179

This comment has been minimized.

Copy link
Member

commented Oct 6, 2015

Closed, see #112

@mikey179 mikey179 closed this Oct 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.