Sets up the test.

@return void
557844
protected function setUp(): void
    {
        parent::setUp();

        if ($this->hasReturnType()) {
            $this->getFile()->recordMetric($this->stackPos, 'Has return type', 'yes');
        }
    }
1189215
public function build()
    {
        $this->clean();
        $this->prepare();
        $this->runCs();
        $this->runCpd();
        $this->runMd();
        $this->runTestsUnit();
    }
30502
public function setup()
	{
		$this->addRule('parent_id', function($data)
		{
			/*if (!isset($data['parent_id']) || $data['parent_id'] == 0)
			{
				return 'Entries must have a parent ID.';
			}*/

			if (isset($data['parent_id']) && $data['parent_id'])
			{
				$parent = self::oneOrNew($data['parent_id']);

				return $parent->get('id') ? false : 'The set parent does not exist.';
			}
			else
			{
				return false;
			}
		});
	}
978903
protected function _setup()
    {
            ini_set('session.name', $this->_name);
            ini_set('session.gc_maxlifetime', $this->_lifetime);
            session_set_cookie_params(
        $this->_expiry,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
    }
1003684
def setup(test_class)
      block = self
      test_class.setup    { block.run(self) }
      test_class.teardown { block.teardown_transaction }
    end
1228113
public function init()
    {
        $this->eventEmitter->on('test.passed', [$this, 'onTestPassed']);
        $this->eventEmitter->on('test.failed', [$this, 'onTestFailed']);
        $this->eventEmitter->on('test.pending', [$this, 'onTestPending']);
        $this->eventEmitter->on('runner.end', [$this, 'onRunnerEnd']);
    }
191562
private function setup()
    {
        self::$version = '3.1.7';
        self::$src = dirname(__FILE__);
        self::$dir = dirname(dirname(__FILE__));
        self::$url = $this->getCuztomUrl(self::$src);

        // Do
        do_action('cuztom_setup');
    }
420342
protected function configure()
    {
        $this->setName('phpjunitmerge')
            ->setDefinition(
                array(
                    new InputArgument(
                        'dir',
                        InputArgument::REQUIRED,
                        'Directory where all files ready to get merged are stored'
                    ),
                    new InputArgument(
                        'file',
                        InputArgument::REQUIRED,
                        'The target file in which the merged result should be written'
                    )
                )
            )
            ->addOption(
                'names',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to check',
                '*.xml'
            )
            ->addOption(
                'ignore',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to ignore',
                'result.xml'
            )
			->addOption(
				'no-suffix',
				null,
				InputOption::VALUE_NONE,
				'Do not add suffix for test suites with duplicate names',
				null
			);
    }
414871
protected function setupLayout()
    {
        if ( ! is_null($this->layout))
        {
            $this->layout = View::make($this->layout);
        }
    }
784102
public function setup()
    {
        $this->groupRoutes();

        foreach ($this->routes as $type => $routes) {
            foreach ($routes as $name => $route) {
                $newRoute = new Route($name, $route);
                if (!$newRoute->hasParam('hostname')) {
                    $newRoute->setParam('hostname', $this->resolveDefaultHostName());
                }

                $routeType = $this->resolveRouteType($type);
                $routeType->add($this->getRouter(), $newRoute);
            }
        }
    }
253592
protected function setUp()
	{
		if (isset($this->configurator->tags[$this->tagName]))
		{
			return;
		}

		// Create tag
		$tag = $this->configurator->tags->add($this->tagName);

		// Create attribute
		$tag->attributes->add($this->attrName);

		// Create a template that replaces its content with the replacement char
		$tag->template
			= '<xsl:value-of select="@' . htmlspecialchars($this->attrName) . '"/>';
	}
237603
public function boot()
    {
        if (env('APP_ENV') == 'testing') {
            $this->app->bind(\Lovata\Toolbox\Classes\Item\TestItem::class, \Lovata\Toolbox\Classes\Item\TestItem::class);
            $this->app->bind(\Lovata\Toolbox\Classes\Collection\TestCollection::class, \Lovata\Toolbox\Classes\Collection\TestCollection::class);
        }
    }
407024
public function setup() {

		// create components.
		if ( ! empty( $this->struct['component'] ) ) {
			$this->register_components();
		}

		foreach ( $this->modals as $modal ) {

			if ( $modal->is_submitted() ) {
				wp_send_json_success( $modal->get_value() );
			}
		}

		parent::setup();
	}
22641
protected function _setup()
    {
        foreach ($this->_properties as $property) {
            $element = $this->_createElement($property);
            if ($element) {
                $this->addElement($element['name'], $element);
            }
        }
        $this->add(
            new Submit(
                ['value' => 'Save']
            )
        );
    }
231974
private function setUpValidations()
    {
        $this
            ->addValidation(array($this, 'amountNotNull'), 'HpsArgumentException', 'AddValue needs an amount')
            ->addValidation(array($this, 'currencyNotNull'), 'HpsArgumentException', 'AddValue needs an currency')
            ->addValidation(array($this, 'trackDataNotNull'), 'HpsArgumentException', 'AddValue needs an trackData')
            ->addValidation(array($this, 'pinBlockNotNull'), 'HpsArgumentException', 'AddValue needs an pinBlock');
    }
697197
public function setup() {
		if ( ! empty( $this->struct['sanitize_callback'] ) ) {
			add_filter( 'uix_' . $this->slug . '_sanitize_' . $this->type, $this->struct['sanitize_callback'] );
		}

		parent::setup();
	}
124864
private function setup()
    {
        $config = $this->config();
        date_default_timezone_set($config['timezone']);

        // Setup routes
        $this->routeManager()->setupRoutes();

        // Setup modules
        $this->setupModules();

        // Setup routable (if not running CLI mode)
        if (PHP_SAPI !== 'cli') {
            $this->setupRoutables();
        }

        // Setup middlewares
        $this->setupMiddlewares();
    }