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

Expect::anyOf should not disable before() #18

Closed
ViliamKopecky opened this issue Mar 29, 2020 · 0 comments
Closed

Expect::anyOf should not disable before() #18

ViliamKopecky opened this issue Mar 29, 2020 · 0 comments

Comments

@ViliamKopecky
Copy link

Version: v1.0.2

Bug Description

before() helper is not called on things nested in Expect::anyOf.

Steps To Reproduce

test(function() { // normalization through anyOf
	$schema = Expect::anyOf(Expect::string()->before(function($v) {
		return (string) $v;
	}));
	Assert::same('1',  $schema->normalize(1, new Context));
});

Expected Behavior

before() should work consistently inside anyOf.

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

1 participant