Skip to content

Commit b6bbe54

Browse files
committed
chore: 🤖 Bump version
1 parent 5c27545 commit b6bbe54

File tree

6 files changed

+41
-64
lines changed

6 files changed

+41
-64
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: ['8.0', 8.1, 8.2]
11+
php: [8.2, 8.3, 8.4]
1212
lib:
13-
- { laravel: ^11.0 }
14-
- { laravel: ^10.0 }
15-
- { laravel: ^9.0 }
13+
- laravel: ^13.0.x-dev
14+
- laravel: ^12.0
15+
- laravel: ^11.0
1616
exclude:
17-
- { php: 8.0, lib: { laravel: ^10.0 } }
18-
- { php: 8.0, lib: { laravel: ^11.0 } }
19-
- { php: 8.1, lib: { laravel: ^11.0 } }
17+
- php: 8.2
18+
lib:
19+
laravel: ^13.0.x-dev
2020

2121
steps:
2222
- uses: actions/checkout@v3

.scrutinizer.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel Database Mock [![Build Status](https://github.com/mpyw/laravel-database-mock/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mpyw/laravel-database-mock/actions) [![Coverage Status](https://coveralls.io/repos/github/mpyw/laravel-database-mock/badge.svg?branch=master)](https://coveralls.io/github/mpyw/laravel-database-mock?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mpyw/laravel-database-mock/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mpyw/laravel-database-mock/?branch=master)
1+
# Laravel Database Mock [![Build Status](https://github.com/mpyw/laravel-database-mock/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mpyw/laravel-database-mock/actions) [![Coverage Status](https://coveralls.io/repos/github/mpyw/laravel-database-mock/badge.svg?branch=master)](https://coveralls.io/github/mpyw/laravel-database-mock?branch=master)
22

33
> [!WARNING]
44
> **Experimental**

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
}
2222
},
2323
"require": {
24-
"php": "^7.3 || ^8.0",
24+
"php": "^8.2",
2525
"ext-pdo": "*",
26-
"illuminate/database": "^9.0 || ^10.0 || ^11.0",
27-
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
28-
"mpyw/mockery-pdo": "0.0.1-alpha7@alpha"
26+
"illuminate/database": "^11.0 || ^12.0 || ^13.0",
27+
"illuminate/support": "^11.0 || ^12.0 || ^13.0",
28+
"mpyw/mockery-pdo": "0.0.1-alpha8@alpha"
2929
},
3030
"require-dev": {
3131
"orchestra/testbench": "*",
32-
"orchestra/testbench-core": ">=7.0",
33-
"phpunit/phpunit": ">=9.5",
32+
"orchestra/testbench-core": ">=9.0",
33+
"phpunit/phpunit": ">=11.0",
3434
"nilportugues/sql-query-formatter": "^1.2.2"
3535
},
3636
"extra": {

phpunit.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3-
<coverage>
2+
<phpunit backupGlobals="false"
3+
bootstrap="vendor/autoload.php"
4+
colors="true"
5+
processIsolation="false"
6+
stopOnFailure="false"
7+
cacheDirectory=".phpunit.cache"
8+
backupStaticProperties="false">
9+
10+
<source>
411
<include>
5-
<directory suffix=".php">src</directory>
12+
<directory>./src</directory>
613
</include>
7-
</coverage>
14+
</source>
15+
16+
<coverage/>
17+
818
<testsuites>
919
<testsuite name="Package Test Suite">
10-
<directory suffix="Test.php">./tests/</directory>
20+
<directory suffix="Test.php">./tests</directory>
1121
</testsuite>
1222
</testsuites>
1323
</phpunit>

tests/Test.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function formatDate(string $date): string
3232
public function testSelectToFetchAll(): void
3333
{
3434
$pdo = DBMock::mockPdo();
35-
$pdo->shouldSelect('select * from `users`')
35+
$pdo->shouldSelect('select * from "users"')
3636
->shouldFetchAllReturns([[
3737
'id' => 1,
3838
'name' => 'John',
@@ -56,7 +56,7 @@ public function testInsert(): void
5656

5757
$pdo = DBMock::mockPdo();
5858
$pdo->shouldInsert(
59-
'insert into `users` (`name`, `email`, `updated_at`, `created_at`) values (?, ?, ?, ?)',
59+
'insert into "users" ("name", "email", "updated_at", "created_at") values (?, ?, ?, ?)',
6060
['John', '[email protected]', '2020-01-01 00:00:00', '2020-01-01 00:00:00']
6161
);
6262
$pdo->expects('lastInsertId')->andReturn(2);
@@ -79,7 +79,7 @@ public function testInsertUsingCallbackMatcher(): void
7979
$pdo = DBMock::mockPdo();
8080
$pdo->shouldInsert(
8181
Mockery::on(function (string $sql) {
82-
$this->assertSame('insert into `users` (`name`, `email`, `updated_at`, `created_at`) values (?, ?, ?, ?)', $sql);
82+
$this->assertSame('insert into "users" ("name", "email", "updated_at", "created_at") values (?, ?, ?, ?)', $sql);
8383
return true;
8484
}),
8585
['John', '[email protected]', '2020-01-01 00:00:00', '2020-01-01 00:00:00']
@@ -102,7 +102,7 @@ public function testUpdate(): void
102102
Carbon::setTestNow('2020-01-02 00:00:00');
103103

104104
$pdo = DBMock::mockPdo();
105-
$pdo->shouldSelect('select * from `users` where `email` = ? limit 1', ['[email protected]'])
105+
$pdo->shouldSelect('select * from "users" where "email" = ? limit 1', ['[email protected]'])
106106
->shouldFetchAllReturns([[
107107
'id' => 2,
108108
'name' => 'John',
@@ -112,8 +112,8 @@ public function testUpdate(): void
112112
]]);
113113
$pdo->shouldUpdateOne(
114114
version_compare($this->app->version(), '5.8', '<')
115-
? 'update `users` set `email` = ?, `updated_at` = ? where `id` = ?'
116-
: 'update `users` set `email` = ?, `users`.`updated_at` = ? where `id` = ?',
115+
? 'update "users" set "email" = ?, "updated_at" = ? where "id" = ?'
116+
: 'update "users" set "email" = ?, "users"."updated_at" = ? where "id" = ?',
117117
['[email protected]', '2020-01-02 00:00:00', 2]
118118
);
119119

@@ -134,7 +134,7 @@ public function testUpdateWithReadReplica(): void
134134

135135
$pdos = DBMock::mockEachPdo();
136136
$pdos->reader()
137-
->shouldSelect('select * from `users` where `email` = ? limit 1', ['[email protected]'])
137+
->shouldSelect('select * from "users" where "email" = ? limit 1', ['[email protected]'])
138138
->shouldFetchAllReturns([[
139139
'id' => 2,
140140
'name' => 'John',
@@ -145,8 +145,8 @@ public function testUpdateWithReadReplica(): void
145145
$pdos->writer()
146146
->shouldUpdateOne(
147147
version_compare($this->app->version(), '5.8', '<')
148-
? 'update `users` set `email` = ?, `updated_at` = ? where `id` = ?'
149-
: 'update `users` set `email` = ?, `users`.`updated_at` = ? where `id` = ?',
148+
? 'update "users" set "email" = ?, "updated_at" = ? where "id" = ?'
149+
: 'update "users" set "email" = ?, "users"."updated_at" = ? where "id" = ?',
150150
['[email protected]', '2020-01-02 00:00:00', 2]
151151
);
152152

@@ -168,11 +168,11 @@ public function testUpdateAndSelectInAnyOrder(): void
168168
$pdo = DBMock::mockPdo()->inAnyOrder();
169169
$pdo->shouldUpdateOne(
170170
version_compare($this->app->version(), '5.8', '<')
171-
? 'update `users` set `email` = ?, `updated_at` = ? where `id` = ?'
172-
: 'update `users` set `email` = ?, `users`.`updated_at` = ? where `id` = ?',
171+
? 'update "users" set "email" = ?, "updated_at" = ? where "id" = ?'
172+
: 'update "users" set "email" = ?, "users"."updated_at" = ? where "id" = ?',
173173
['[email protected]', '2020-01-02 00:00:00', 2]
174174
);
175-
$pdo->shouldSelect('select * from `users` where `email` = ? limit 1', ['[email protected]'])
175+
$pdo->shouldSelect('select * from "users" where "email" = ? limit 1', ['[email protected]'])
176176
->shouldFetchAllReturns([[
177177
'id' => 2,
178178
'name' => 'John',

0 commit comments

Comments
 (0)