Skip to content

Commit

Permalink
[11.x] Fix SQL Server tests (#52222)
Browse files Browse the repository at this point in the history
* fix slqsrv tests

* fix date tests
  • Loading branch information
hafezdivandari authored Jul 22, 2024
1 parent 9d7c869 commit 29a58fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions tests/Foundation/Testing/WormholeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

class WormholeTest extends TestCase
{
protected function tearDown(): void
{
parent::tearDown();

Date::useDefault();
}

public function testCanTravelBackToPresent()
{
// Preserve the timelines we want to compare the reality with...
Expand Down Expand Up @@ -42,9 +49,6 @@ public function testCarbonImmutableCompatibility()

// Assert the time travel was successful...
$this->assertEquals($future->format('Y-m-d'), now()->format('Y-m-d'));

// Restore the default Date Factory...
Date::useDefault();
}

public function testItCanTravelByMicroseconds()
Expand All @@ -57,7 +61,5 @@ public function testItCanTravelByMicroseconds()

(new Wormhole(5))->microseconds();
$this->assertSame('2000-01-01 00:00:00.000006', Date::now()->format('Y-m-d H:i:s.u'));

Date::useDefault();
}
}
2 changes: 1 addition & 1 deletion tests/Integration/Database/DatabaseSchemaBlueprintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ public function testAddColumnNamedCreateWorks()
});

Schema::table('users', function (Blueprint $table) {
$table->string('create');
$table->string('create')->nullable();
});

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

0 comments on commit 29a58fe

Please sign in to comment.