mpratt / Embera

A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
MIT License
339 stars 59 forks source link

Fix tests on IFixIt embeds after change in embed HTML #32

Closed GromNaN closed 8 years ago

GromNaN commented 8 years ago

Tests on master branch are currently failing.

$ phpunit --filter=TestServiceIFixIt
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.

F.                                                                  2 / 2 (100%)

Time: 2.19 seconds, Memory: 29.25Mb

There was 1 failure:

1) TestServiceIFixIt::testProvider
Response is not <iframe in http://www.ifixit.com/Guide/Replacing+iPad+4+CDMA+Logic+Board/16458
Failed asserting that '<script type="text/javascript" src="http://d1luk0418egahw.cloudfront.net/static/embed/ifixit-embed.3.js?id=16458"></script>' contains "<iframe".

/Embera/Tests/TestProviders.php:162
/Embera/Tests/TestProviders.php:78
/Embera/Tests/TestServiceIFixIt.php:38

FAILURES!
Tests: 2, Assertions: 10, Failures: 1.

Generating code coverage report in HTML format ... done

The HTML has changed. The script tag has been replaced by an iframe.

Example: https://fr.ifixit.com/Embed?url=http%3A%2F%2Ffr.ifixit.com%2FGuide%2FiPad%2B4%2BCDMA%2BLogic%2BBoard%2BReplacement%2F16458&format=json

mpratt commented 8 years ago

Thank you very much @GromNaN ! PR Merged and pushed!