Skip to content

Commit 250b5d5

Browse files
author
Maxofil
committed
rename names
1 parent 92c38e2 commit 250b5d5

File tree

6 files changed

+39
-39
lines changed

6 files changed

+39
-39
lines changed

tests/ObserverComponent/EventMapperTest.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function testComponentRegisteredReturn() : void
1313
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
1414
$httpResponse2->expects('send');
1515

16-
$request = new \Nette\Application\Request('BlaPresenter:edit');
16+
$request = new \Nette\Application\Request('TestPresenter:edit');
1717

1818
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
1919
$presenter->expects('getAction')
@@ -25,7 +25,7 @@ public function testComponentRegisteredReturn() : void
2525

2626
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
2727
$presenterFactory->expects('createPresenter')
28-
->with('BlaPresenter:edit')
28+
->with('TestPresenter:edit')
2929
->andReturn($presenter);
3030

3131
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -40,13 +40,13 @@ public function testComponentRegisteredReturn() : void
4040
$storage->expects('read')
4141
->once()
4242
->withAnyArgs()
43-
->andReturn([0 => BlaPresenter::class]);
43+
->andReturn([0 => TestPresenter::class]);
4444

45-
$component = \Mockery::mock(Bla::class);
45+
$component = \Mockery::mock(TestComponent::class);
4646
$component->expects('lookupPath')
4747
->once()
4848
->with(\Nette\Application\IPresenter::class)
49-
->andReturn(BlaPresenter::class);
49+
->andReturn(TestPresenter::class);
5050

5151
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage, false);
5252
$instance->registerObserver($component);
@@ -57,7 +57,7 @@ public function testComponentRegisteredContinue() : void
5757
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
5858
$httpResponse2->expects('send');
5959

60-
$request = new \Nette\Application\Request('BlaPresenter:edit');
60+
$request = new \Nette\Application\Request('TestPresenter:edit');
6161

6262
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
6363
$presenter->expects('getAction')
@@ -68,7 +68,7 @@ public function testComponentRegisteredContinue() : void
6868

6969
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
7070
$presenterFactory->expects('createPresenter')
71-
->with('BlaPresenter:edit')
71+
->with('TestPresenter:edit')
7272
->andReturn($presenter);
7373

7474
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -83,16 +83,16 @@ public function testComponentRegisteredContinue() : void
8383
$storage->expects('read')
8484
->twice()
8585
->withAnyArgs()
86-
->andReturn([0 => BlaPresenter::class, 1 => 'test']);
86+
->andReturn([0 => TestPresenter::class, 1 => 'test']);
8787

88-
$component = \Mockery::mock(Bla::class);
88+
$component = \Mockery::mock(TestComponent::class);
8989
$component->expects('lookupPath')
9090
->with(\Nette\Application\IPresenter::class)
91-
->andReturn(BlaPresenter::class);
91+
->andReturn(TestPresenter::class);
9292
$component->expects('getObservedEvents')
9393
->once()
9494
->withNoArgs()
95-
->andReturn([BlaEventEdit::class, 'shrek']);
95+
->andReturn([TestEventEdit::class, 'shrek']);
9696

9797
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage);
9898
$instance->registerObserver($component);
@@ -103,7 +103,7 @@ public function testRegisterObserver() : void
103103
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
104104
$httpResponse2->expects('send');
105105

106-
$request = new \Nette\Application\Request('BlaPresenter:edit');
106+
$request = new \Nette\Application\Request('TestPresenter:edit');
107107

108108
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
109109
$presenter->expects('getAction')
@@ -114,7 +114,7 @@ public function testRegisterObserver() : void
114114

115115
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
116116
$presenterFactory->expects('createPresenter')
117-
->with('BlaPresenter:edit')
117+
->with('TestPresenter:edit')
118118
->andReturn($presenter);
119119

120120
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -134,13 +134,13 @@ public function testRegisterObserver() : void
134134
->twice()
135135
->withAnyArgs();
136136

137-
$component = \Mockery::mock(Bla::class);
137+
$component = \Mockery::mock(TestComponent::class);
138138
$component->expects('lookupPath')
139139
->with(\Nette\Application\IPresenter::class)
140-
->andReturn(Bla::class);
140+
->andReturn(TestComponent::class);
141141
$component->expects('getObservedEvents')
142142
->withNoArgs()
143-
->andReturn([BlaEventEdit::class]);
143+
->andReturn([TestEventEdit::class]);
144144

145145
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage);
146146
$instance->registerObserver($component);
@@ -153,9 +153,9 @@ public function testDispatchEvent() : void
153153
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
154154
$httpResponse2->expects('send');
155155

156-
$request = new \Nette\Application\Request('BlaPresenter:edit');
156+
$request = new \Nette\Application\Request('TestPresenter:edit');
157157

158-
$component = new Bla();
158+
$component = new TestComponent();
159159

160160
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
161161
$presenter->expects('getAction')
@@ -166,12 +166,12 @@ public function testDispatchEvent() : void
166166
->andReturn($httpResponse2);
167167
$presenter->expects('getComponent')
168168
->once()
169-
->with(Bla::class)
169+
->with(TestComponent::class)
170170
->andReturn($component);
171171

172172
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
173173
$presenterFactory->expects('createPresenter')
174-
->with('BlaPresenter:edit')
174+
->with('TestPresenter:edit')
175175
->andReturn($presenter);
176176

177177
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -186,9 +186,9 @@ public function testDispatchEvent() : void
186186
$storage->expects('read')
187187
->once()
188188
->withAnyArgs()
189-
->andReturn([0 => Bla::class]);
189+
->andReturn([0 => TestComponent::class]);
190190

191-
$event = new BlaEventEdit();
191+
$event = new TestEventEdit();
192192

193193
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage);
194194
$instance->dispatchEvent($event);
@@ -199,7 +199,7 @@ public function testIsComponentRegistered() : void
199199
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
200200
$httpResponse2->expects('send');
201201

202-
$request = new \Nette\Application\Request('BlaPresenter:edit');
202+
$request = new \Nette\Application\Request('TestPresenter:edit');
203203

204204
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
205205
$presenter->expects('getAction')
@@ -211,7 +211,7 @@ public function testIsComponentRegistered() : void
211211

212212
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
213213
$presenterFactory->expects('createPresenter')
214-
->with('BlaPresenter:edit')
214+
->with('TestPresenter:edit')
215215
->andReturn($presenter);
216216

217217
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -230,13 +230,13 @@ public function testIsComponentRegistered() : void
230230
->twice()
231231
->withAnyArgs();
232232

233-
$component = \Mockery::mock(Bla::class);
233+
$component = \Mockery::mock(TestComponent::class);
234234
$component->expects('lookupPath')
235235
->with(\Nette\Application\IPresenter::class)
236-
->andReturn(BlaPresenter::class);
236+
->andReturn(TestPresenter::class);
237237
$component->expects('getObservedEvents')
238238
->withNoArgs()
239-
->andReturn([Bla::class]);
239+
->andReturn([TestComponent::class]);
240240

241241
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage, false);
242242
$instance->registerObserver($component);

tests/ObserverComponent/TObservableTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public function testInjectEventMapperObservable() : void
1111
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
1212
$httpResponse2->expects('send');
1313

14-
$request = new \Nette\Application\Request('BlaPresenter:edit');
14+
$request = new \Nette\Application\Request('TestPresenter:edit');
1515

1616
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
1717
$presenter->expects('run')
1818
->andReturn($httpResponse2);
1919

2020
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
2121
$presenterFactory->expects('createPresenter')
22-
->with('BlaPresenter:edit')
22+
->with('TestPresenter:edit')
2323
->andReturn($presenter);
2424

2525
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -46,7 +46,7 @@ public function testNotifyObservers() : void
4646
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
4747
$httpResponse2->expects('send');
4848

49-
$request = new \Nette\Application\Request('BlaPresenter:edit');
49+
$request = new \Nette\Application\Request('TestPresenter:edit');
5050

5151
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
5252
$presenter->expects('getAction')
@@ -58,7 +58,7 @@ public function testNotifyObservers() : void
5858

5959
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
6060
$presenterFactory->expects('createPresenter')
61-
->with('BlaPresenter:edit')
61+
->with('TestPresenter:edit')
6262
->andReturn($presenter);
6363

6464
$router = \Mockery::mock(\Nette\Routing\Router::class);
@@ -76,7 +76,7 @@ public function testNotifyObservers() : void
7676

7777
$instance = new \Infinityloop\ObserverComponent\EventMapper($application, $storage);
7878

79-
$event = new BlaEventEdit();
79+
$event = new TestEventEdit();
8080

8181
$decoratorInstance = new class()
8282
{

tests/ObserverComponent/TObserverComponentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public function testInjectEventMapperObserver() : void
1111
$httpResponse2 = \Mockery::mock(\Nette\Application\IResponse::class);
1212
$httpResponse2->expects('send');
1313

14-
$request = new \Nette\Application\Request('BlaPresenter:edit');
14+
$request = new \Nette\Application\Request('TestPresenter:edit');
1515

1616
$presenter = \Mockery::mock(\Nette\Application\IPresenter::class);
1717
$presenter->expects('run')
1818
->andReturn($httpResponse2);
1919

2020
$presenterFactory = \Mockery::mock(\Nette\Application\IPresenterFactory::class);
2121
$presenterFactory->expects('createPresenter')
22-
->with('BlaPresenter:edit')
22+
->with('TestPresenter:edit')
2323
->andReturn($presenter);
2424

2525
$router = \Mockery::mock(\Nette\Routing\Router::class);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
namespace Infinityloop\Tests\ObserverComponent;
66

7-
class Bla implements \Infinityloop\ObserverComponent\IObserverComponent
7+
class TestComponent implements \Infinityloop\ObserverComponent\IObserverComponent
88
{
99
use \Infinityloop\ObserverComponent\TObserverComponent;
1010

1111
public static function getObservedEvents() : array
1212
{
1313
return [
14-
\Infinityloop\Tests\ObserverComponent\BlaEventEdit::class
14+
\Infinityloop\Tests\ObserverComponent\TestEventEdit::class
1515
];
1616
}
1717

@@ -22,6 +22,6 @@ public function observableUpdated(\Infinityloop\ObserverComponent\IEvent $event)
2222

2323
public function lookupPath(?string $type = null, bool $throw = true) : ?string
2424
{
25-
return BlaPresenter::class;
25+
return TestPresenter::class;
2626
}
2727
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
namespace Infinityloop\Tests\ObserverComponent;
66

7-
final class BlaEventEdit implements \Infinityloop\ObserverComponent\IEvent
7+
final class TestEventEdit implements \Infinityloop\ObserverComponent\IEvent
88
{
99
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
namespace Infinityloop\Tests\ObserverComponent;
66

7-
class BlaPresenter extends \Nette\Application\UI\Presenter
7+
class TestPresenter extends \Nette\Application\UI\Presenter
88
{
99
}

0 commit comments

Comments
 (0)