<?php
/**
 * @package Garp
 * @author  Harmen Janssen <harmen@grrr.nl>
 */
trait Garp_Test_Traits_UsesTestHelper {

    /**
     * @var Garp_Test_PHPUnit_Helper
     */
    protected $_helper;

    /**
     * Fixtures
     *
     * @var array
     */
    protected $_mockData = array();

    public function setUp(): void {
        $this->_helper = new Garp_Test_PHPUnit_Helper();
        $this->_helper->setUp($this->_mockData);
        parent::setUp();
    }

    public function tearDown(): void {
        if ($this->_helper) {
            $this->_helper->tearDown($this->_mockData);
        }
        parent::tearDown();
    }

}

<?php
/**
 * @package Garp
 * @author  Harmen Janssen <harmen@grrr.nl>
 */
trait Garp_Test_Traits_UsesTestHelper {

    /**
     * @var Garp_Test_PHPUnit_Helper
     */
    protected $_helper;

    public function setUp(): void {
        $this->_helper = new Garp_Test_PHPUnit_Helper();
        $mockData = property_exists($this, '_mockData') ? $this->_mockData : [];
        $this->_helper->setUp($mockData);
        parent::setUp();
    }

    public function tearDown(): void {
        $mockData = property_exists($this, '_mockData') ? $this->_mockData : [];
        if ($this->_helper) {
            $this->_helper->tearDown($mockData);
        }
        parent::tearDown();
    }

}


Remove $_mockData from TestCase trait
Remove $_mockData from TestCase trait

It cannot share a property with subclasses because subclasses will
always change the value, and this is invalid in PHP.
