Skip to content

Commit 9bf009c

Browse files
committed
Remove use of lang.reflect.Package
1 parent cf39084 commit 9bf009c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎src/test/php/lang/unittest/ClassLoaderTest.class.php‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php namespace lang\unittest;
22

33
use lang\archive\{Archive, ArchiveClassLoader};
4-
use lang\reflect\Package;
54
use lang\{
65
ClassCastException,
76
ClassDependencyException,
@@ -131,11 +130,10 @@ public function loadClassFileWithIncorrectDeclaration() {
131130

132131
#[Test]
133132
public function loadClassFileWithRecursionInStaticBlock() {
134-
with ($p= Package::forName('lang.unittest.fixture')); {
135-
$two= $p->loadClass('StaticRecursionTwo');
136-
$one= $p->loadClass('StaticRecursionOne');
137-
Assert::equals($two, $one->reflect()->getProperty('two')->getValue(null));
138-
}
133+
$cl= ClassLoader::getDefault();
134+
$two= $cl->loadClass('lang.unittest.fixture.StaticRecursionTwo');
135+
$one= $cl->loadClass('lang.unittest.fixture.StaticRecursionOne');
136+
Assert::equals($two, $one->reflect()->getProperty('two')->getValue(null));
139137
}
140138

141139
#[Test, Expect(IllegalStateException::class)]

0 commit comments

Comments
 (0)