facebookarchive / facebook-instant-articles-sdk-php

The Facebook Instant Articles SDK for PHP provides a native interface for creating and publishing Instant Articles.
https://instantarticles.fb.com/
Other
232 stars 148 forks source link

Transformer's transform method does not account for settings #346

Closed pestevez closed 5 years ago

pestevez commented 5 years ago

Steps required to reproduce the problem

  1. Use a set of rules that include Analytics or Ads settings
  2. Create instant article markup using the Transformer::transform, instead of Transformer::transformString

Expected Result

The markup includes the corresponding Analytics and/or Ads code

Actual Result

The markup does not include the corresponding Analytics and/or Ads code because transform does not call handleTransformationSettings.

Note: To repro, replace transformString with transform in SimpleTransformerTest::testSelfTransformerContent and run the tests (composer test).