Skip to content

Commit

Permalink
Refactored tests
Browse files Browse the repository at this point in the history
Moved trait test to {hidanjkezor/traits_fix} branch
  • Loading branch information
Hidanio committed Sep 27, 2023
1 parent 5f618db commit bfc249c
Show file tree
Hide file tree
Showing 32 changed files with 157 additions and 195 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
@ok
KPHP_COMPOSER_ROOT={dir}
<?php
#ifndef KPHP
require_once 'kphp_tester_include.php';
#endif
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/Dinosaur012/EoraptorLunensis012.php';

\Dinosaur012\EoraptorLunensis012::roar2();
\Printer012\Printer012::print();

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace BasePrinter012;

use Vk\TestSrt\SomeStr;

class BasePrinter012 {
final public static function basePrint(): void {
$r1 = new SomeStr();
echo "BasePrint\n";
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: "@photos"
name: "@printer012"
description: ""
namespace: "Photos014\\"
namespace: "Printer012\\"

# "Public API" of the modulite: classes, functions, constants, etc.
# Symbols not listed here will be internal.
export:
- "Photo014"
- "Printer012"

# Class members to exclude, they override "export".
force-internal:

# Dependencies: other modulites, global classes, defines, etc.
require:

- "\\BasePrinter012\\BasePrinter012"

# Granting partial access to internal symbols, "as an exception".
allow-internal-access:
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Printer012;

use BasePrinter012\BasePrinter012;

class Printer012 extends BasePrinter012 {

public static function print(): void {
self::basePrint();
echo "print\n";
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"name": "vk/str-strings",
"type": "library",
"license": "MIT",
"name": "phpt/012",
"autoload": {
"psr-4": {
"Archosauria\\": "./Archosauria",
"Dinosaur\\": "./Dinosaur",
"Vk\\TestSrt\\": "./Packages/vk-strings/src"
"BasePrinter012\\": "./BasePrinter012",
"Printer012\\": "./Printer012"
}
},
"require": {},
"require": {
"vk/strings": "*"
},
"repositories": [
{
"type": "path",
"url": "./Packages/vk-strings"
"url": "./packages/vk-strings"
}
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Vk\TestSrt;

class SomeStr {
public static function concatStr(string $s1, string $s2):string {
public static function concatStr(string $s1, string $s2): string {
return $s1 . $s2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitbb52b28c50e98dd784e86af97f9f0592::getLoader();
return ComposerAutoloaderInit451b6d5135cd4eb8e84df3fc66c39587::getLoader();
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@
$baseDir = dirname($vendorDir);

return array(
'Archosauria\\AppendStr' => $baseDir . '/Archosauria/AppendStr.php',
'Archosauria\\Thecodontia' => $baseDir . '/Archosauria/Thecodontia.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Dinosaur\\EoraptorLunensis' => $baseDir . '/Dinosaur/EoraptorLunensis.php',
'Vk\\TestSrt\\SomeStr' => $baseDir . '/Packages/vk-strings/src/SomeStr.php',
);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$baseDir = dirname($vendorDir);

return array(
'Vk\\TestSrt\\' => array($baseDir . '/Packages/vk-strings/src'),
'Dinosaur\\' => array($baseDir . '/Dinosaur'),
'Archosauria\\' => array($baseDir . '/Archosauria'),
'Vk\\TestSrt\\' => array($vendorDir . '/vk/strings/src'),
'Printer012\\' => array($baseDir . '/Printer012'),
'BasePrinter012\\' => array($baseDir . '/BasePrinter012'),
);
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitbb52b28c50e98dd784e86af97f9f0592
class ComposerAutoloaderInit451b6d5135cd4eb8e84df3fc66c39587
{
private static $loader;

Expand All @@ -22,12 +22,12 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitbb52b28c50e98dd784e86af97f9f0592', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit451b6d5135cd4eb8e84df3fc66c39587', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitbb52b28c50e98dd784e86af97f9f0592', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit451b6d5135cd4eb8e84df3fc66c39587', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitbb52b28c50e98dd784e86af97f9f0592::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit451b6d5135cd4eb8e84df3fc66c39587::getInitializer($loader));

$loader->register(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,48 @@

namespace Composer\Autoload;

class ComposerStaticInitbb52b28c50e98dd784e86af97f9f0592
class ComposerStaticInit451b6d5135cd4eb8e84df3fc66c39587
{
public static $prefixLengthsPsr4 = array (
'V' =>
array (
'Vk\\TestSrt\\' => 11,
),
'D' =>
'P' =>
array (
'Dinosaur\\' => 9,
'Printer012\\' => 11,
),
'A' =>
'B' =>
array (
'Archosauria\\' => 12,
'BasePrinter012\\' => 15,
),
);

public static $prefixDirsPsr4 = array (
'Vk\\TestSrt\\' =>
array (
0 => __DIR__ . '/../..' . '/Packages/vk-strings/src',
0 => __DIR__ . '/..' . '/vk/strings/src',
),
'Dinosaur\\' =>
'Printer012\\' =>
array (
0 => __DIR__ . '/../..' . '/Dinosaur',
0 => __DIR__ . '/../..' . '/Printer012',
),
'Archosauria\\' =>
'BasePrinter012\\' =>
array (
0 => __DIR__ . '/../..' . '/Archosauria',
0 => __DIR__ . '/../..' . '/BasePrinter012',
),
);

public static $classMap = array (
'Archosauria\\AppendStr' => __DIR__ . '/../..' . '/Archosauria/AppendStr.php',
'Archosauria\\Thecodontia' => __DIR__ . '/../..' . '/Archosauria/Thecodontia.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Dinosaur\\EoraptorLunensis' => __DIR__ . '/../..' . '/Dinosaur/EoraptorLunensis.php',
'Vk\\TestSrt\\SomeStr' => __DIR__ . '/../..' . '/Packages/vk-strings/src/SomeStr.php',
);

public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitbb52b28c50e98dd784e86af97f9f0592::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbb52b28c50e98dd784e86af97f9f0592::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbb52b28c50e98dd784e86af97f9f0592::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit451b6d5135cd4eb8e84df3fc66c39587::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit451b6d5135cd4eb8e84df3fc66c39587::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit451b6d5135cd4eb8e84df3fc66c39587::$classMap;

}, null, ClassLoader::class);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
{
"packages": [],
"packages": [
{
"name": "vk/strings",
"version": "0.0.1",
"version_normalized": "0.0.1.0",
"dist": {
"type": "path",
"url": "./packages/vk-strings",
"reference": "0bbbd1fe63f5142d8c529bb2d8d6651418afe292"
},
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Vk\\TestSrt\\": "src/"
}
},
"transport-options": {
"relative": true
},
"install-path": "../vk/strings"
}
],
"dev": true,
"dev-package-names": []
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
<?php return array(
'root' => array(
'name' => 'vk/str-strings',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'name' => 'phpt/012',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '5f618dbe608b5011faf88660826d6e7212816d43',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'vk/str-strings' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'phpt/012' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '5f618dbe608b5011faf88660826d6e7212816d43',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'vk/strings' => array(
'pretty_version' => '0.0.1',
'version' => '0.0.1.0',
'reference' => '0bbbd1fe63f5142d8c529bb2d8d6651418afe292',
'type' => 'library',
'install_path' => __DIR__ . '/../vk/strings',
'aliases' => array(),
'dev_requirement' => false,
),
),
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
require_once 'kphp_tester_include.php';
#endif

\Dinosaur013\EoraptorLunensis013::roar2();
\Printer013\Printer013::print();

This file was deleted.

This file was deleted.

Loading

0 comments on commit bfc249c

Please sign in to comment.