Skip to content

Commit

Permalink
ci: tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dirx committed Oct 23, 2024
1 parent ccbd9c4 commit b390a32
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
37 changes: 21 additions & 16 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<testsuites>
<testsuite name="RdKafka FFI Bindings">
<directory suffix=".php">tests/</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<file>src/constants.php</file>
<file>src/RdKafka/FFI/Methods.php</file>
<directory suffix=".php">src/RdKafka/FFI/Versions</directory>
</exclude>
</coverage>
<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">
<testsuites>
<testsuite name="RdKafka FFI Bindings">
<directory suffix="Test.php">tests/</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<file>src/constants.php</file>
<file>src/RdKafka/FFI/Methods.php</file>
<directory>src/RdKafka/FFI/Versions</directory>
</exclude>
</coverage>
</phpunit>
2 changes: 2 additions & 0 deletions resources/phpunit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use RdKafka\FFI\Library;

require __DIR__ . '/../../vendor/autoload.php';
Expand Down
2 changes: 1 addition & 1 deletion tests/RdKafka/TopicConfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testSetPartitionerCbWithCallback(): void
$topicConf = new TopicConf();
$topicConf->setOpaque($expectedTopicOpaque);
$topicConf->setPartitionerCb(
function (string $key, int $partitionCount, ?object $topic_opaque = null, ?object $message_opaque = null) use (&$callbackTopicOpaque, &$callbackMessageOpaque) {
function (?string $key, int $partitionCount, ?object $topic_opaque = null, ?object $message_opaque = null) use (&$callbackTopicOpaque, &$callbackMessageOpaque) {
$callbackTopicOpaque = $topic_opaque;
$callbackMessageOpaque = $message_opaque;
// force partition 2
Expand Down

0 comments on commit b390a32

Please sign in to comment.