Sage unit tests with PEST

Hi, i have a wordpress theme based on sage. I don`t use Bedrock. I would like to add unit tests to my theme. I want to work on production files (Wordpress, plugins, my theme) and on a test database, which is a production copy. Perhaps one of you has already configured the environment for such tests and is able to instruct a junior in this matter? I tried to create something with what I found, but it looks like my bootstrap.php file is wrong.

<?php

// Ścieżka do testowego pliku konfiguracyjnego WordPress
$wp_config_test_path = './../../../wp-config-tests.php';

if (!file_exists($wp_config_test_path)) {
	echo $wp_config_test_path;
	echo "File not exists: wp-config-tests.php. \n";
	exit(1);
}

// Załaduj testową konfigurację WordPress
define('WP_CONFIG_TEST_PATH', $wp_config_test_path);
require_once $wp_config_test_path;

echo ABSPATH;
// Załaduj WordPress
require_once ABSPATH . 'wp-load.php';

// Załaduj Composer autoloader
require_once dirname(__DIR__) . '/vendor/autoload.php';

// Załaduj framework testowy WordPress
require dirname(__DIR__) . '/vendor/wp-phpunit/wp-phpunit/includes/bootstrap.php';