<commit_before><?php
namespace pyd\testkit\events;

use pyd\testkit\TestCase;

/**
 * TearDown event triggered by {@see pyd\testkit\TestCase::tearDown()}.
 *
 * @author <NAME> <<EMAIL>>
 */
class TearDown extends Event
{
    /**
     * Instance of the test case that did trigger this event.
     * 
     * @var \pyd\testkit\TestCase
     */
    protected $testCase;
    /**
     * @var boolean test method was executed in a separate process 
     */
    protected $testIsInIsolation;
    
    /**
     * @param TestCase $testCase
     */
    public function __construct(TestCase $testCase)
    {
        $this->testCase = $testCase;
        $this->init();
    }
    
    protected function init()
    {
        $this->testIsInIsolation = $this->testCase->isInIsolation();
    }
    
    /**
     * @return boolean test method was executed in a separate process
     */
    public function getTestIsInIsolation()
    {
        return $this->testIsInIsolation;
    }
    
    /**
     * @return string this event name
     */
    public static function name()
    {
        return 'tearDown';
    }
}<commit_msg>Add a method to get test case instance from TearDown event class<commit_after><?php
namespace pyd\testkit\events;

use pyd\testkit\TestCase;

/**
 * TearDown event triggered by {@see pyd\testkit\TestCase::tearDown()}.
 *
 * @author <NAME> <<EMAIL>>
 */
class TearDown extends Event
{
    /**
     * Instance of the test case that did trigger this event.
     * 
     * @var \pyd\testkit\TestCase
     */
    protected $testCase;
    /**
     * @var boolean test method was executed in a separate process 
     */
    protected $testIsInIsolation;
    
    /**
     * @param TestCase $testCase
     */
    public function __construct(TestCase $testCase)
    {
        $this->testCase = $testCase;
        $this->init();
    }
    
    protected function init()
    {
        $this->testIsInIsolation = $this->testCase->isInIsolation();
    }
    
    /**
     * @see $testCase
     * @return \pyd\testkit\TestCase
     */
    public function getTestCase()
    {
        return $this->testCase;
    }
    
    /**
     * @return boolean test method was executed in a separate process
     */
    public function getTestIsInIsolation()
    {
        return $this->testIsInIsolation;
    }
    
    /**
     * @return string this event name
     */
    public static function name()
    {
        return 'tearDown';
    }
}
{'fraction_non_alphanumeric': 0.11733223548785508, 'fraction_numerical': 0.0, 'mean_word_length': 2.1193838254172017, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 22, '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': '1324025', 'n_tokens_mistral': 739, 'n_tokens_neox': 737, 'n_words': 190}