Skip to content

Commit 4012d62

Browse files
committed
fix: Unit tests
1 parent bf836b2 commit 4012d62

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.0-cli
1+
FROM php:8.1-cli
22
RUN apt-get update \
33
&& apt-get install -y \
44
libzip-dev \

tests/Unit/BoltFactoryTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Laudis\Neo4j\Tests\Unit;
1515

1616
use Bolt\connection\IConnection;
17-
use Bolt\enum\ServerState;
17+
use Bolt\protocol\ServerState;
1818
use Bolt\protocol\V5;
1919
use Laudis\Neo4j\Authentication\Authenticate;
2020
use Laudis\Neo4j\Bolt\BoltConnection;
@@ -43,8 +43,9 @@ protected function setUp(): void
4343
$protocolFactory = $this->createMock(ProtocolFactory::class);
4444
$protocolFactory->method('createProtocol')
4545
->willReturnCallback(static function (IConnection $connection) {
46-
$protocol = new V5(1, $connection);
47-
$protocol->serverState = ServerState::READY;
46+
$serverState = new ServerState();
47+
$serverState->set(ServerState::READY);
48+
$protocol = new V5(1, $connection, $serverState);
4849

4950
return [
5051
$protocol,

tests/Unit/DNSAddressResolverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ protected function setUp(): void
2828

2929
public function testResolverGhlenDotCom(): void
3030
{
31-
$records = iterator_to_array($this->resolver->getAddresses('test.ghlen.com'), false);
31+
$records = iterator_to_array($this->resolver->getAddresses('www.cloudflare.com'), false);
3232

33-
$this->assertEqualsCanonicalizing(['test.ghlen.com', '123.123.123.123', '123.123.123.124'], $records);
33+
$this->assertEqualsCanonicalizing(['www.cloudflare.com', '104.16.123.96', '104.16.124.96'], $records);
3434
$this->assertNotEmpty($records);
35-
$this->assertEquals('test.ghlen.com', $records[0] ?? '');
35+
$this->assertEquals('www.cloudflare.com', $records[0] ?? '');
3636
}
3737

3838
public function testResolverGoogleDotComReverse(): void

tests/Unit/ParameterHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function testDateTime(): void
165165
$date = ParameterHelper::asParameter(new DateTime('now', new DateTimeZone('Europe/Brussels')), ConnectionProtocol::BOLT_V44());
166166

167167
self::assertInstanceOf(DateTimeZoneId::class, $date);
168-
self::assertEquals('Europe/Brussels', $date->tz_id);
168+
self::assertEquals('Europe/Brussels', $date->tz_id());
169169
}
170170

171171
public function testDateTime5(): void

0 commit comments

Comments
 (0)