Skip to content

Commit b390a32

Browse files
committed
ci: tweak tests
1 parent ccbd9c4 commit b390a32

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

phpunit.xml

+21-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="resources/phpunit/bootstrap.php" colors="true" verbose="true" failOnWarning="true" cacheResult="false">
3-
<testsuites>
4-
<testsuite name="RdKafka FFI Bindings">
5-
<directory suffix=".php">tests/</directory>
6-
</testsuite>
7-
</testsuites>
8-
<coverage processUncoveredFiles="true">
9-
<include>
10-
<directory suffix=".php">src/</directory>
11-
</include>
12-
<exclude>
13-
<file>src/constants.php</file>
14-
<file>src/RdKafka/FFI/Methods.php</file>
15-
<directory suffix=".php">src/RdKafka/FFI/Versions</directory>
16-
</exclude>
17-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
bootstrap="resources/phpunit/bootstrap.php"
5+
colors="true" verbose="true"
6+
failOnWarning="true"
7+
cacheResult="false">
8+
<testsuites>
9+
<testsuite name="RdKafka FFI Bindings">
10+
<directory suffix="Test.php">tests/</directory>
11+
</testsuite>
12+
</testsuites>
13+
<coverage processUncoveredFiles="true">
14+
<include>
15+
<directory suffix=".php">src/</directory>
16+
</include>
17+
<exclude>
18+
<file>src/constants.php</file>
19+
<file>src/RdKafka/FFI/Methods.php</file>
20+
<directory>src/RdKafka/FFI/Versions</directory>
21+
</exclude>
22+
</coverage>
1823
</phpunit>

resources/phpunit/bootstrap.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use RdKafka\FFI\Library;
46

57
require __DIR__ . '/../../vendor/autoload.php';

tests/RdKafka/TopicConfTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function testSetPartitionerCbWithCallback(): void
171171
$topicConf = new TopicConf();
172172
$topicConf->setOpaque($expectedTopicOpaque);
173173
$topicConf->setPartitionerCb(
174-
function (string $key, int $partitionCount, ?object $topic_opaque = null, ?object $message_opaque = null) use (&$callbackTopicOpaque, &$callbackMessageOpaque) {
174+
function (?string $key, int $partitionCount, ?object $topic_opaque = null, ?object $message_opaque = null) use (&$callbackTopicOpaque, &$callbackMessageOpaque) {
175175
$callbackTopicOpaque = $topic_opaque;
176176
$callbackMessageOpaque = $message_opaque;
177177
// force partition 2

0 commit comments

Comments
 (0)