callTraitMethods example

foreach ($this->setUpMethods as $method) {
            $this->{$method}();
        }

        // Check for the database trait         if (method_exists($this, 'setUpDatabase')) {
            $this->setUpDatabase();
        }

        // Check for other trait methods         $this->callTraitMethods('setUp');
    }

    protected function tearDown(): void
    {
        parent::tearDown();

        foreach ($this->tearDownMethods as $method) {
            $this->{$method}();
        }

        // Check for the database trait
Home | Imprint | This part of the site doesn't use cookies.