<commit_before><?php

namespace SimplyTestable\ApiBundle\Tests\Command\Stripe\Event\ProcessCommand\EventType\CustomerSubscriptionUpdated\StatusChange\TrialingToActive;

use SimplyTestable\ApiBundle\Tests\Command\Stripe\Event\ProcessCommand\EventType\CustomerSubscriptionUpdated\StatusChange\ActionStatusTest;

abstract class TrialingToActiveTest extends ActionStatusTest {   
    
    abstract protected function getHasCard();
    
    public function testNotificationHasCard() {
        $this->assertNotificationBodyField('has_card', (int)$this->getHasCard());
    }
    
    public function testNotificationHasPlan() {
        $this->assertNotificationBodyField('plan', 'agency');
    }      

    protected function getCurrentSubscriptionStatus() {
        return 'active';
    }

    protected function getPreviousSubscriptionStatus() {
        return 'trialing';
    }
    
    protected function getStripeEventFixturePath() {
        return $this->getFixturesDataPath() . '/../../StripeEvents/customer.subscription.updated.statuschange.json';
    }    

}<commit_msg>Include plan name in trial to active stripe event notification<commit_after><?php

namespace SimplyTestable\ApiBundle\Tests\Command\Stripe\Event\ProcessCommand\EventType\CustomerSubscriptionUpdated\StatusChange\TrialingToActive;

use SimplyTestable\ApiBundle\Tests\Command\Stripe\Event\ProcessCommand\EventType\CustomerSubscriptionUpdated\StatusChange\ActionStatusTest;

abstract class TrialingToActiveTest extends ActionStatusTest {   
    
    abstract protected function getHasCard();
    
    public function testNotificationHasCard() {
        $this->assertNotificationBodyField('has_card', (int)$this->getHasCard());
    }

    protected function getCurrentSubscriptionStatus() {
        return 'active';
    }

    protected function getPreviousSubscriptionStatus() {
        return 'trialing';
    }
    
    protected function getStripeEventFixturePath() {
        return $this->getFixturesDataPath() . '/../../StripeEvents/customer.subscription.updated.statuschange.json';
    }    

}
{'fraction_non_alphanumeric': 0.09526112185686654, 'fraction_numerical': 0.0, 'mean_word_length': 4.18546365914787, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1701504', 'n_tokens_mistral': 529, 'n_tokens_neox': 533, 'n_words': 84}