File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SimpleSAML \TestUtils ;
6+
7+ /**
8+ * Class \SimpleSAML\TestUtils\AbstractTestContainer
9+ */
10+ abstract class AbstractTestContainerSingleton
11+ {
12+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SimpleSAML \TestUtils ;
6+
7+ /**
8+ * Class \SimpleSAML\TestUtils\TestContainerSingleton
9+ */
10+ final class TestContainerSingleton
11+ {
12+ protected static AbstractTestContainer $ testContainer ;
13+
14+
15+ /** Set a container to use. */
16+ public static function setContainer (AbstractTestContainer $ testContainer ): void
17+ {
18+ self ::$ testContainer = $ testContainer ;
19+ }
20+
21+
22+ public static function getContainer (): AbstractTestContainer
23+ {
24+ Assert::notNull (self ::$ testContainer , 'No container set. ' );
25+ return self ::$ testContainer ;
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments