Skip to content

Commit

Permalink
Upgrade to support laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-samir907 committed Apr 10, 2023
1 parent 1607b71 commit 6f247b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
}
],
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^7.0"
"php": "^8.0",
"illuminate/support": "^9.0"
},
"require-dev": {
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^9.0"
"orchestra/testbench": "^7.24",
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 0 additions & 5 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<server name="APP_ENV" value="testing"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/InsertOrUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function test_can_perfom_insert_or_update_query_without_unique_key_except
]);
$query->execute();

$user = DB::table('users')->where("email")->first();
$user = DB::table('users')->first();
$this->assertEquals($user->name, "mohamed samir");
$this->assertEquals($user->password, "mohamed124");
}
Expand Down
5 changes: 4 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ protected function setUp(): void

public function getEnvironmentSetUp($app)
{
config()->set('database.default', 'testing');
$app["config"]->set('database.default', 'mysql');
$app["config"]->set("database.connections.mysql.database", "testdb");
$app["config"]->set("database.connections.mysql.username", "root");
$app["config"]->set("database.connections.mysql.password", "");
}

private function createTables()
Expand Down

0 comments on commit 6f247b3

Please sign in to comment.