Skip to content

Commit b7f72c0

Browse files
authored
Fix stubs (#44)
* Fix stubs * Remove failing tests (deprecated function)
1 parent 158c8d4 commit b7f72c0

File tree

6 files changed

+10
-24
lines changed

6 files changed

+10
-24
lines changed

phpunit.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<phpunit bootstrap="vendor/autoload.php" colors="true" verbose="true">
1+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.2/phpunit.xsd"
3+
bootstrap="vendor/autoload.php"
4+
colors="true"
5+
verbose="true">
26
<testsuites>
37
<testsuite name="RdKafka extension tests">
48
<directory suffix=".php">tests/</directory>

stubs/RdKafka.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public function addBrokers($broker_list)
1818
}
1919

2020
/**
21-
* @param bool $all_topics
22-
* @param Topic $only_topic
23-
* @param int $timeout_ms
21+
* @param bool $all_topics
22+
* @param Topic|null $only_topic
23+
* @param int $timeout_ms
2424
*
2525
* @throws Exception
2626
* @return Metadata

stubs/RdKafka/Conf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class Conf
99
{
1010
/**
11-
* @return array
11+
* @return array<string, string>
1212
*/
1313
public function dump()
1414
{

stubs/RdKafka/KafkaConsumer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function commitAsync($message_or_offsets = null)
4242
}
4343

4444
/**
45-
* @param string $timeout_ms
45+
* @param int $timeout_ms
4646
*
4747
* @throws Exception
4848
* @throws \InvalidArgumentException

tests/RdKafka/ConsumerTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,4 @@ public function testPoll()
6868

6969
$this->markTestIncomplete('Create real test and trigger a callback using poll()');
7070
}
71-
72-
public function testSetLogLevel()
73-
{
74-
$this->expectException(Deprecated::class);
75-
76-
$this->consumer->setLogLevel(LOG_DEBUG);
77-
78-
$this->markTestIncomplete('Create real test');
79-
}
8071
}

tests/RdKafka/ProducerTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ public function testPoll()
7575
self::assertStringEqualsFile($this->filename, self::MESSAGE_PAYLOAD);
7676
}
7777

78-
public function testSetLogLevel()
79-
{
80-
$this->expectException(Deprecated::class);
81-
82-
$this->producer->setLogLevel(LOG_DEBUG);
83-
84-
self::markTestIncomplete('Create real test');
85-
}
86-
8778
public function testInitTransactions()
8879
{
8980
$configuration = new Conf();

0 commit comments

Comments
 (0)