Skip to content

Conversation

@pavellishin
Copy link
Contributor

@pavellishin pavellishin commented May 16, 2019

The <title> tags typically don't have any useful diagnostic information, but the <h1> tags do - so parse those out first!

  • yank out error parsing code into separate method

@danielbachhuber
Copy link
Contributor

@pavellishin I wouldn't be bothered by mocking Solarium for this. You could abstract the parsing logic to a dedicated method if you wanted to write some simple unit tests for it.

@pavellishin
Copy link
Contributor Author

pavellishin commented May 16, 2019

@danielbachhuber that's not a bad idea. I think I'd still want to add a test to ensure that SolrPower_Sync::post returning false invokes the error handler, but yanking that out would make it more easily extensible if there's more useful error messaging we can yank out of a response.

@danielbachhuber
Copy link
Contributor

@pavellishin On second thought, I think this PR looks fine as-is. Are you happy with it?

@pavellishin
Copy link
Contributor Author

@danielbachhuber yeah - I think your suggestion about pulling code out is good, but I could spend hours making little fixes forever :)

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

Successfully merging this pull request may close these issues.

2 participants