Improper casing of parseVidFromURL method. This breaks mocking the facade in tests
Closed this issue · 2 comments
I was writing a test case that tests a controller that uses the youtube library. In your documentation, the method is parseVidFromUrl. However, you incorrectly have it as parseVIdFromUrl (notice the capital I).
Normally, this doesn't break PHP since calling methods is normally case insensitive. However, when mocking the Youtube facade to return something for this method using the expected casing, you'll receive a message:
Static method Mockery_0_Alaouy_Youtube_Youtube::parseVIdFromURL() does not exist on this mock object
This is when you try to do something like:
Youtube::shouldReceive('parseVidFromURL')->andReturn('d5c9mj-PbLI');
I only found this after crawling through source code.
Changing the casing correctly in your source should not change any functionality. I can create a PR if you really really need it.
@tdondich Thank you for reporting this, indeed that is typo, yes it would be great to send a PR fixing this.
Sorry for the extremely late response on this. PR submitted.