From d49c216da07c9d6b23f85a7f2694aae7bdc4d490 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 19 Dec 2024 13:34:37 +1300 Subject: [PATCH] MNT Fix unit test --- tests/Schema/AbstractTypeRegistryTest.php | 2 +- tests/Schema/IntegrationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Schema/AbstractTypeRegistryTest.php b/tests/Schema/AbstractTypeRegistryTest.php index 8fca02d4..ba1fce86 100644 --- a/tests/Schema/AbstractTypeRegistryTest.php +++ b/tests/Schema/AbstractTypeRegistryTest.php @@ -140,7 +140,7 @@ public function provideRebuildOnMissing(): array private function getInstance() { - $registry = new Class extends AbstractTypeRegistry + $registry = new class extends AbstractTypeRegistry { protected static function getSourceDirectory(): string { diff --git a/tests/Schema/IntegrationTest.php b/tests/Schema/IntegrationTest.php index 8739567d..6ccdea80 100644 --- a/tests/Schema/IntegrationTest.php +++ b/tests/Schema/IntegrationTest.php @@ -1434,7 +1434,7 @@ public function testDBFieldArgs() $node = $result['data']['readOneDataObjectFake'] ?? null; $this->assertEquals('This is a varchar field', $node['myField']); $this->assertEquals('Saturday', $node['date1']); - $this->assertEquals('2/29/20, 5:00 PM', $node['date2']); + $this->assertMatchesRegularExpression('#2/29/20,\h5:00\hPM#iu', $node['date2']); $this->assertEquals('5:00:00 PM', $node['date3']); $this->assertEquals('2020', $node['date4']); $this->assertEquals('This is a really long text field. It has a few sentences.', $node['myText']);