Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Fix failing testCreateItemWithMissingType. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zegnat
Copy link

@Zegnat Zegnat commented Sep 14, 2015

Currently the first test is failing because it watches for the wrong Exception.

1) ItemTest::testCreateItemWithMissingType
Failed asserting that exception message 'Missing required field: type' contains 'Invalid value type'.

null is not an invalid value as Item#__set automatically converts it to an empty string (''). The required fields check trips over a missing type, as expected, so there is no lack of exception. It just isn’t the one you are testing for.

This fixes the PHPUnit test to listen for the correct exception.

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

Successfully merging this pull request may close these issues.

None yet

1 participant