2 require_once __DIR__
.'/../Framework.php';
4 class Kohana
extends Framework
{
5 protected function install(): void
{
7 $root = nullthrows($this->getInstallRoot());
9 verbose("Initialize submodules.\n");
10 $git_command = "git submodule update --init";
11 $git_ret = run_install($git_command, $root,
12 ProxyInformation
::$proxies);
14 remove_dir_recursive($root);
15 error_and_exit("Could not initialize submodules for ". $this->name
.
16 "! Removing framework!\n");
19 verbose("Updating submodule branches.\n");
20 // Manually checkout release appropriate system branch
21 // See: https://github.com/kohana/kohana/wiki/developers
22 $git_command = 'git submodule foreach "';
23 $git_command .= 'git fetch && git checkout';
24 $git_command .= ' '.$this->getGitBranch().'"';
25 $git_ret = run_install($git_command, $root,
26 ProxyInformation
::$proxies);
28 remove_dir_recursive($root);
29 error_and_exit("Could not checkout submodule branch for ". $this->name
.
30 "! Removing framework!\n");
33 verbose("Creating a phpunit.xml for running the Kohana tests.\n");
35 <phpunit bootstrap="./modules/unittest/bootstrap_all_modules.php">
37 <testsuite name="Kohana">
38 <directory>./system</directory>
39 <directory>./modules</directory>
44 file_put_contents($this->getTestPath()."/phpunit.xml", $phpunit_xml);
47 protected function isInstalled(): bool {
49 $this->getTestPath()."/phpunit.xml",
51 $root = nullthrows($this->getInstallRoot());
53 if (file_exists($root)) {
54 foreach ($extra_files as $file) {
55 if (!file_exists($file)) {
56 remove_dir_recursive($root);
61 return parent
::isInstalled();