Skip to content

Commit d64243f

Browse files
committed
Update tests
1 parent ad7bee2 commit d64243f

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

composer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"name": "sylingd/yesf-framework",
33
"description": "Yesf framework",
4-
"keywords": ["framework"],
4+
"keywords": [
5+
"framework"
6+
],
57
"license": "Apache-2.0",
68
"type": "library",
7-
"bin": ["bin/yesf"],
9+
"bin": [
10+
"bin/yesf"
11+
],
812
"require": {
913
"php": ">=7.1.0",
1014
"ext-mbstring": "*",
@@ -21,5 +25,11 @@
2125
"psr-4": {
2226
"Yesf\\": "src/"
2327
}
28+
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"YesfTest\\": "tests/Cases/",
32+
"TestApp\\": "tests/TestApp/"
33+
}
2434
}
25-
}
35+
}

examples/Base/app/Config/Project.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
'name' => 'yesf',
44
'namespace' => 'YesfApp\\',
55
'charset' => 'utf-8',
6-
'bootstrap' => 'Bootstrap',
76
'router' => [
87
'map' => true,
98
'extension' => true

examples/DI/app/Config/Project.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
'name' => 'yesf',
44
'namespace' => 'YesfApp\\',
55
'charset' => 'utf-8',
6-
'bootstrap' => 'Bootstrap',
76
'router' => [
87
'extension' => true
98
],

tests/bootstrap.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,6 @@
1010
define('YESF_TEST', __DIR__ . '/');
1111
require(PROJECT_PATH . '/vendor/autoload.php');
1212

13-
function getLoader() {
14-
static $loader = null;
15-
if ($loader === null) {
16-
$classes = get_declared_classes();
17-
foreach ($classes as $clazz) {
18-
if (strpos($clazz, 'ComposerAutoloaderInit') === 0 && method_exists($clazz, 'getLoader')) {
19-
$loader = $clazz::getLoader();
20-
break;
21-
}
22-
}
23-
if ($loader === null) {
24-
throw new Exception('Composer loader not found');
25-
}
26-
}
27-
return $loader;
28-
}
29-
30-
getLoader()->addPsr4('YesfTest\\', TEST_SRC);
31-
getLoader()->addPsr4('TestApp\\', TEST_APP);
32-
3313
$app = new Yesf();
3414
$app->setEnvConfig(APP_PATH . 'Config/env.ini');
3515

0 commit comments

Comments
 (0)