hamcrest-php icon indicating copy to clipboard operation
hamcrest-php copied to clipboard

Add FileMatchers

Open vasekbrychta opened this issue 4 years ago • 4 comments

Would it be possible to add FileMatchers?

vasekbrychta avatar Aug 01 '21 21:08 vasekbrychta

Sure. Please send a PR.

If you've found any more inconsistencies between the Java library version and this PHP port, then please open corresponding issues/PRs for adding missing stuff.

aik099 avatar Aug 02 '21 09:08 aik099

Ok, I'll prepare the PR.

vasekbrychta avatar Aug 03 '21 14:08 vasekbrychta

Would you prefer the file matchers to match string paths, SplFileInfo objects or both?

vasekbrychta avatar Aug 03 '21 21:08 vasekbrychta

@vasekbrychta , both:

  • if string is provided it's wrapped into SplFileInfo class
  • if SplFileInfo object is provided, then it's used as is

For reference: https://github.com/hamcrest/JavaHamcrest/blob/master/hamcrest/src/main/java/org/hamcrest/io/FileMatchers.java

aik099 avatar Aug 12 '21 08:08 aik099