From e4bb8d86d625b1f94ae0942eca517c4efc8577b6 Mon Sep 17 00:00:00 2001 From: Stephan Vock Date: Thu, 9 May 2024 10:31:00 +0100 Subject: [PATCH 1/2] SubscriptionAddon: fix call to undefined method Recurly_SubscriptionAddOn::__valuesString() --- Tests/Recurly/SubscriptionAddOn_Test.php | 10 ++++++++++ lib/recurly/subscription_addon.php | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 Tests/Recurly/SubscriptionAddOn_Test.php diff --git a/Tests/Recurly/SubscriptionAddOn_Test.php b/Tests/Recurly/SubscriptionAddOn_Test.php new file mode 100644 index 00000000..e4a47368 --- /dev/null +++ b/Tests/Recurly/SubscriptionAddOn_Test.php @@ -0,0 +1,10 @@ +assertSame('', $addon->__toString()); + } +} diff --git a/lib/recurly/subscription_addon.php b/lib/recurly/subscription_addon.php index 7c0aff01..cb00198e 100644 --- a/lib/recurly/subscription_addon.php +++ b/lib/recurly/subscription_addon.php @@ -49,13 +49,4 @@ protected function getChangedAttributes($nested = false) { ); return array_diff_key($this->_values, $immutable); } - - /** - * Pretty string version of the object - */ - public function __toString() { - $class = get_class($this); - $values = $this->__valuesString(); - return "<$class $values>"; - } } From 2dd51e02c9a9e739ff96a8b4bc20cee3c132206f Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 9 May 2024 19:49:55 +0100 Subject: [PATCH 2/2] Update SubscriptionAddOn_Test.php Co-authored-by: Douglas Miller --- Tests/Recurly/SubscriptionAddOn_Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Recurly/SubscriptionAddOn_Test.php b/Tests/Recurly/SubscriptionAddOn_Test.php index e4a47368..ec3144a0 100644 --- a/Tests/Recurly/SubscriptionAddOn_Test.php +++ b/Tests/Recurly/SubscriptionAddOn_Test.php @@ -5,6 +5,6 @@ class Recurly_SubscriptionAddOn_Test extends Recurly_TestCase public function testToString() { $addon = new \Recurly_SubscriptionAddOn(); - $this->assertSame('', $addon->__toString()); + $this->assertSame('', $addon->__toString()); } }