Skip to content

Commit 08e136a

Browse files
Fix tests (#218)
1 parent e495a97 commit 08e136a

File tree

4 files changed

+7
-33
lines changed

4 files changed

+7
-33
lines changed

phpunit.xml.dist

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,12 @@
2727
convertNoticesToExceptions="true"
2828
beStrictAboutTestsThatDoNotTestAnything="true"
2929
beStrictAboutOutputDuringTests="true"
30-
beStrictAboutTestSize="true"
3130
verbose="true"
3231
colors="true">
3332
<filter>
3433
<whitelist>
3534
<directory suffix=".php">src/Functional</directory>
3635
</whitelist>
37-
<blacklist>
38-
<file>src/Functional/_import.php</file>
39-
<directory suffix=".php">tests/</directory>
40-
<directory suffix=".php">vendor/</directory>
41-
</blacklist>
4236
</filter>
4337

4438
<testsuites>
@@ -48,11 +42,10 @@
4842
</testsuites>
4943

5044
<logging>
51-
<log type="coverage-html" target="build/coverage" title="functional-php code coverage"
52-
charset="UTF-8" yui="true" highlight="true"
45+
<log type="coverage-html" target="build/coverage"
5346
lowUpperBound="35" highLowerBound="70"/>
5447
<log type="coverage-clover" target="build/logs/clover.xml"/>
55-
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
48+
<log type="junit" target="build/logs/junit.xml"/>
5649
</logging>
5750

5851
<php>

src/Functional/Exceptions/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function assertCallback($callback, $callee, $parameterPosition)
4343
$sep = '->';
4444
}
4545

46-
$callback = \implode($callback, $sep);
46+
$callback = \implode($sep, $callback);
4747
break;
4848

4949
default:

tests/Functional/CompareOnTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public function testCompareValues()
1919
{
2020
$comparator = compare_on('strcmp');
2121

22-
$this->assertSame(-1, $comparator(1, 2));
23-
$this->assertSame(0, $comparator(2, 2));
24-
$this->assertSame(1, $comparator(20, 10));
22+
$this->assertSame(-1, $comparator('a', 'b'));
23+
$this->assertSame(0, $comparator('a', 'a'));
24+
$this->assertSame(1, $comparator('b', 'a'));
2525
}
2626

2727
public function testCompareWithReducer()

tests/Functional/WithTest.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,6 @@ function ($value) {
3838
);
3939
}
4040

41-
public function testWithCallback()
42-
{
43-
DeprecatedError::$enabled = false;
44-
45-
$this->assertSame(
46-
'value',
47-
with(
48-
function () {
49-
return 'value';
50-
},
51-
function ($value) {
52-
return $value;
53-
}
54-
)
55-
);
56-
57-
DeprecatedError::$enabled = true;
58-
}
59-
6041
public function testPassNonCallable()
6142
{
6243
$this->expectArgumentError("Argument 2 passed to Functional\with() must be callable");
@@ -71,7 +52,7 @@ public function testDefaultValue()
7152
null,
7253
function () {
7354
},
74-
true,
55+
false,
7556
'foo'
7657
)
7758
);

0 commit comments

Comments
 (0)