Skip to content

Commit 29a58fe

Browse files
[11.x] Fix SQL Server tests (#52222)
* fix slqsrv tests * fix date tests
1 parent 9d7c869 commit 29a58fe

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

tests/Foundation/Testing/WormholeTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
class WormholeTest extends TestCase
1111
{
12+
protected function tearDown(): void
13+
{
14+
parent::tearDown();
15+
16+
Date::useDefault();
17+
}
18+
1219
public function testCanTravelBackToPresent()
1320
{
1421
// Preserve the timelines we want to compare the reality with...
@@ -42,9 +49,6 @@ public function testCarbonImmutableCompatibility()
4249

4350
// Assert the time travel was successful...
4451
$this->assertEquals($future->format('Y-m-d'), now()->format('Y-m-d'));
45-
46-
// Restore the default Date Factory...
47-
Date::useDefault();
4852
}
4953

5054
public function testItCanTravelByMicroseconds()
@@ -57,7 +61,5 @@ public function testItCanTravelByMicroseconds()
5761

5862
(new Wormhole(5))->microseconds();
5963
$this->assertSame('2000-01-01 00:00:00.000006', Date::now()->format('Y-m-d H:i:s.u'));
60-
61-
Date::useDefault();
6264
}
6365
}

tests/Integration/Database/DatabaseSchemaBlueprintTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public function testAddColumnNamedCreateWorks()
514514
});
515515

516516
Schema::table('users', function (Blueprint $table) {
517-
$table->string('create');
517+
$table->string('create')->nullable();
518518
});
519519

520520
$this->assertTrue(Schema::hasColumn('users', 'create'));

0 commit comments

Comments
 (0)