Skip to content

Commit 15e6674

Browse files
committed
test: fix Fake classes and test code to pass
1 parent 2326ede commit 15e6674

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

tests/Fake/CI_Email.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66

77
class CI_Email
88
{
9+
public function to(string $to): CI_Email
10+
{
11+
return $this;
12+
}
913
}

tests/Fake/CI_Input.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@
66

77
class CI_Input
88
{
9-
public function method(): string
9+
public function method(bool $upper = false): string
1010
{
1111
return 'GET';
1212
}
13+
14+
/**
15+
* @param mixed $index
16+
*
17+
* @return mixed
18+
*/
19+
public function get($index = null, bool $xss_clean = false)
20+
{
21+
return 'GET value';
22+
}
1323
}

tests/TestDoubleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function test_getDouble_method_returns_execption(): void
7878
};
7979
$mock = $this->getDouble(CI_Input::class, ['method' => $ret]);
8080

81-
$mock->method('abc', 'def');
81+
$mock->method();
8282
}
8383

8484
public function test_getDouble_constructor_param(): void

0 commit comments

Comments
 (0)