|
4 | 4 |
|
5 | 5 | use Arachne\Bootstrap\Configurator; |
6 | 6 | use Arachne\ContainerAdapter\ContainerAdapter; |
7 | | -use Arachne\ContainerAdapter\Exception\NotSupportedException; |
8 | 7 | use Codeception\Test\Unit; |
9 | | -use Codeception\Util\Stub; |
10 | 8 | use DateTime; |
11 | 9 | use IntegrationSuiteGuy; |
12 | 10 | use Nette\DI\Container; |
13 | 11 | use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; |
14 | 12 | use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; |
15 | | -use Symfony\Component\DependencyInjection\ScopeInterface; |
16 | 13 |
|
17 | 14 | /** |
18 | 15 | * @author Jáchym Toušek <enumag@gmail.com> |
@@ -60,10 +57,6 @@ public function testSet() |
60 | 57 | $service2 = new DateTime(); |
61 | 58 | $this->containerAdapter->set('date', $service2); |
62 | 59 | $this->assertSame($service2, $this->containerAdapter->get('date')); |
63 | | - |
64 | | - $this->tester->expectException(NotSupportedException::class, function () { |
65 | | - $this->containerAdapter->set('date', new DateTime(), 'scope'); |
66 | | - }); |
67 | 60 | } |
68 | 61 |
|
69 | 62 | public function testHas() |
@@ -103,41 +96,6 @@ public function testSetParameter() |
103 | 96 | $this->assertSame('value', $this->containerAdapter->getParameter('nonexistent')); |
104 | 97 | } |
105 | 98 |
|
106 | | - public function testEnterScope() |
107 | | - { |
108 | | - $this->tester->expectException(NotSupportedException::class, function () { |
109 | | - $this->containerAdapter->enterScope('scope'); |
110 | | - }); |
111 | | - } |
112 | | - |
113 | | - public function testLeaveScope() |
114 | | - { |
115 | | - $this->tester->expectException(NotSupportedException::class, function () { |
116 | | - $this->containerAdapter->leaveScope('scope'); |
117 | | - }, NotSupportedException::class); |
118 | | - } |
119 | | - |
120 | | - public function testAddScope() |
121 | | - { |
122 | | - $this->tester->expectException(NotSupportedException::class, function () { |
123 | | - $this->containerAdapter->addScope(Stub::makeEmpty(ScopeInterface::class)); |
124 | | - }); |
125 | | - } |
126 | | - |
127 | | - public function testHasScope() |
128 | | - { |
129 | | - $this->tester->expectException(NotSupportedException::class, function () { |
130 | | - $this->containerAdapter->hasScope('scope'); |
131 | | - }); |
132 | | - } |
133 | | - |
134 | | - public function testIsScopeActive() |
135 | | - { |
136 | | - $this->tester->expectException(NotSupportedException::class, function () { |
137 | | - $this->containerAdapter->isScopeActive('scope'); |
138 | | - }); |
139 | | - } |
140 | | - |
141 | 99 | private function createContainer($file) |
142 | 100 | { |
143 | 101 | $config = new Configurator(); |
|
0 commit comments