File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-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 AbstractTestContainer
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+ use SimpleSAML \XML \Assert \Assert ;
8+
9+ /**
10+ * Class \SimpleSAML\TestUtils\TestContainerSingleton
11+ */
12+ final class TestContainerSingleton
13+ {
14+ protected static AbstractTestContainer $ testContainer ;
15+
16+
17+ /** Set a container to use. */
18+ public static function setContainer (AbstractTestContainer $ testContainer ): void
19+ {
20+ self ::$ testContainer = $ testContainer ;
21+ }
22+
23+
24+ public static function getContainer (): AbstractTestContainer
25+ {
26+ Assert::notNull (self ::$ testContainer , 'No container set. ' );
27+ return self ::$ testContainer ;
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments