Skip to content

Commit 27322c0

Browse files
committed
Adding Additional Test - Adjusting To Public But Not Called As Test
1 parent 8f527d8 commit 27322c0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/unit/Dispatcher/CallActionMethodCest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function dispatcherCallActionMethod(UnitTester $I)
4747

4848
$dispatcher->callActionMethod(
4949
$this,
50-
'wasCalled'
50+
'_wasCalled'
5151
);
5252

5353
$I->assertTrue($this->wasCalled);
@@ -68,15 +68,15 @@ public function dispatcherCallActionMethodWithParams(UnitTester $I)
6868

6969
$dispatcher->callActionMethod(
7070
$this,
71-
'paramCalled',
71+
'_paramCalled',
7272
[
73-
'something'
73+
'something' => 'else'
7474
]
7575
);
7676

7777
$I->assertFalse($this->wasCalled);
7878
$I->assertFalse($this->altCalled);
79-
$I->assertEquals('something', $this->paramCalled);
79+
$I->assertEquals('else', $this->paramCalled);
8080
}
8181

8282
/**
@@ -93,7 +93,7 @@ public function dispatcherCallActionMethodWithEvents(UnitTester $I)
9393
$eventsManager->attach(
9494
'dispatch:beforeCallAction',
9595
function (Event $event, Dispatcher $dispatcher, Collection $observer) {
96-
$observer->action = "altCalled";
96+
$observer->action = "_altCalled";
9797
}
9898
);
9999

@@ -103,24 +103,24 @@ function (Event $event, Dispatcher $dispatcher, Collection $observer) {
103103

104104
$dispatcher->callActionMethod(
105105
$this,
106-
'wasCalled'
106+
'_wasCalled'
107107
);
108108

109109
$I->assertTrue($this->altCalled);
110110
$I->assertFalse($this->wasCalled);
111111
}
112112

113-
public function wasCalled(): void
113+
public function _wasCalled(): void
114114
{
115115
$this->wasCalled = true;
116116
}
117117

118-
public function altCalled(): void
118+
public function _altCalled(): void
119119
{
120120
$this->altCalled = true;
121121
}
122122

123-
public function paramCalled(string $param): void
123+
public function _paramCalled(string $param): void
124124
{
125125
$this->paramCalled = $param;
126126
}

0 commit comments

Comments
 (0)