Closed cjke closed 7 years ago
@jgrossi Not sure why Travis is failing. It's marking the BasicField constructor as missing the Post argument - but the dev branch doesn't take a Post argument in the constructor any more (only in master).
Can I confirm that I am merging against the right branch according to your contribution guidelines?
hi @cjke there are 7 test failing... did you confirm all the tests are passing locally?
the branch is correct.
I think it's not necessary testing empty fields for all fields in that page, once all of them are Text
field and you are testing the same get()
method.
Hi. Yes all tests are passing locally.
And yes, agree about the overlap of tests but:
At the end of the day, your library, so your call - but wanted to explain the reasoning.
In terms of the tests failing - as mentioned above, it seems that the test cases are running about the library when it was expecting the BasicField constructor to accept an argument (which isn't the case in dev anymore).
This is in relation to #4
Note that the tests use assertSame instead of assertEqual because with assertEqual returns true for
assertEqual("", null)
, which is not what we want.Results as per the contributing guide:
Out of interest, you can run the new tests without the changes to BasicField and see how pulling out a "" wasn't possible.
Also note, I needed to add a new Page in WP with all the empty fields (the new sql dump includes that):
This was added to the Custom Field manually (also in the sql dump)
Btw: That first PR failed because I didn't zip up the correct sql dump.