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

Support the new methods in 1.4 #6

Open
Nyholm opened this issue Jan 10, 2019 · 3 comments
Open

Support the new methods in 1.4 #6

Nyholm opened this issue Jan 10, 2019 · 3 comments

Comments

@Nyholm
Copy link

Nyholm commented Jan 10, 2019

I released 1.4.0 with some new assertions that should be added here.

  • Assert::ip()
  • Assert::ipv4()
  • Assert::ipv6()
  • Assert::notRegex()
  • Assert::interfaceExists()
  • Assert::isList()
  • Assert::isMap()
@Nyholm Nyholm changed the title New methods to add Support the new methods in 1.4 Jan 10, 2019
@mavimo
Copy link
Contributor

mavimo commented Jan 11, 2019

@Nyholm I'm planning to work on it the next week cc/ @ondrejmirtes

@ruudk
Copy link
Contributor

ruudk commented Feb 18, 2020

Maybe good to change the title to Support the new methods between 1.4 and 1.7
https://github.com/webmozart/assert/blob/1.7.0/CHANGELOG.md#170-2020-02-14

@herndlm
Copy link
Contributor

herndlm commented Mar 29, 2024

fyi @ondrejmirtes I went through methods in webmozart/assert and what we support here and saw that only the following don't further specify types:

type:

string:

  • Assert::notContains()
  • Assert::notStartsWith()
  • Assert::notEndsWith()
  • Assert::regex()
  • Assert::notRegex()

file:

  • Assert::fileExists()
  • Assert::file()
  • Assert::directory()
  • Assert::readable()
  • Assert::writable()

object:

  • Assert::propertyNotExists()
  • Assert::methodNotExists()

function:

  • Assert::throws()

I'm not sure if more is possible. Related to this issue the only one left is notRegex(), which checks that a string does not match a given regex. Not sure, but I don't think we can specify further types here, except doing something with constant strings maybe, but not sure if it's possible/worth.

IMO this issue can be closed, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants