Skip to content

Commit 822f739

Browse files
committed
fix mocj
1 parent 787f179 commit 822f739

File tree

2 files changed

+72
-70
lines changed

2 files changed

+72
-70
lines changed

src/.meta.php

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
<?php
2-
3-
namespace Illuminate\Support\Facades {
4-
use Umbrellio\Postgres\Schema\Definitions\ForeignKeyDefinition;
5-
6-
/**
7-
* @method ForeignKeyDefinition[] getForeignKeys(string $tableName)
8-
*/
9-
class Schema {
10-
11-
}
12-
}
13-
14-
namespace Illuminate\Database\Schema {
15-
16-
use Closure;
17-
use Illuminate\Support\Fluent;
18-
use Umbrellio\Postgres\Schema\Definitions\AttachPartitionDefinition;
19-
use Umbrellio\Postgres\Schema\Definitions\CheckDefinition;
20-
use Umbrellio\Postgres\Schema\Definitions\ExcludeDefinition;
21-
use Umbrellio\Postgres\Schema\Definitions\LikeDefinition;
22-
use Umbrellio\Postgres\Schema\Definitions\ViewDefinition;
23-
use Umbrellio\Postgres\Schema\Definitions\UniqueDefinition;
24-
25-
/**
26-
* @method __construct($table, Closure $callback = null, $prefix = '')
27-
*
28-
* @method AttachPartitionDefinition attachPartition(string $partition)
29-
* @method void detachPartition(string $partition)
30-
* @method LikeDefinition like(string $table)
31-
* @method Fluent ifNotExists()
32-
* @method UniqueDefinition uniquePartial($columns, ?string $index = null, ?string $algorithm = null)
33-
* @method ViewDefinition createView(string $view, string $select, bool $materialize = false)
34-
* @method Fluent dropView(string $view)
35-
* @method ColumnDefinition numeric(string $column, ?int $precision = null, ?int $scale = null)
36-
* @method ColumnDefinition tsrange(string $column)
37-
* @method ColumnDefinition tstzrange(string $column)
38-
* @method ColumnDefinition daterange(string $column)
39-
* @method ExcludeDefinition exclude($columns, ?string $index = null)
40-
* @method CheckDefinition check($columns, ?string $index = null)
41-
* @method string getTable()
42-
* @method ColumnDefinition|Fluent addColumn($type, $name, array $parameters = [])
43-
*
44-
* @property bool $temporary
45-
*/
46-
class Blueprint
47-
{
48-
protected function addCommand($name, array $parameters = []): Fluent
49-
{
50-
return new Fluent();
51-
}
52-
53-
protected function createIndexName($type, array $columns): string
54-
{
55-
return '';
56-
}
57-
58-
protected function dropIndexCommand($command, $type, $index): Fluent
59-
{
60-
return new Fluent();
61-
}
62-
}
63-
64-
/**
65-
* @method ColumnDefinition using($expression)
66-
*/
67-
class ColumnDefinition extends Fluent
68-
{
69-
}
70-
}
2+
//
3+
//namespace Illuminate\Support\Facades {
4+
// use Umbrellio\Postgres\Schema\Definitions\ForeignKeyDefinition;
5+
//
6+
// /**
7+
// * @method ForeignKeyDefinition[] getForeignKeys(string $tableName)
8+
// */
9+
// class Schema {
10+
//
11+
// }
12+
//}
13+
//
14+
//namespace Illuminate\Database\Schema {
15+
//
16+
// use Closure;
17+
// use Illuminate\Support\Fluent;
18+
// use Umbrellio\Postgres\Schema\Definitions\AttachPartitionDefinition;
19+
// use Umbrellio\Postgres\Schema\Definitions\CheckDefinition;
20+
// use Umbrellio\Postgres\Schema\Definitions\ExcludeDefinition;
21+
// use Umbrellio\Postgres\Schema\Definitions\LikeDefinition;
22+
// use Umbrellio\Postgres\Schema\Definitions\ViewDefinition;
23+
// use Umbrellio\Postgres\Schema\Definitions\UniqueDefinition;
24+
//
25+
// /**
26+
// * @method __construct($table, Closure $callback = null, $prefix = '')
27+
// *
28+
// * @method AttachPartitionDefinition attachPartition(string $partition)
29+
// * @method void detachPartition(string $partition)
30+
// * @method LikeDefinition like(string $table)
31+
// * @method Fluent ifNotExists()
32+
// * @method UniqueDefinition uniquePartial($columns, ?string $index = null, ?string $algorithm = null)
33+
// * @method ViewDefinition createView(string $view, string $select, bool $materialize = false)
34+
// * @method Fluent dropView(string $view)
35+
// * @method ColumnDefinition numeric(string $column, ?int $precision = null, ?int $scale = null)
36+
// * @method ColumnDefinition tsrange(string $column)
37+
// * @method ColumnDefinition tstzrange(string $column)
38+
// * @method ColumnDefinition daterange(string $column)
39+
// * @method ExcludeDefinition exclude($columns, ?string $index = null)
40+
// * @method CheckDefinition check($columns, ?string $index = null)
41+
// * @method string getTable()
42+
// * @method ColumnDefinition|Fluent addColumn($type, $name, array $parameters = [])
43+
// *
44+
// * @property bool $temporary
45+
// */
46+
// class Blueprint
47+
// {
48+
// protected function addCommand($name, array $parameters = []): Fluent
49+
// {
50+
// return new Fluent();
51+
// }
52+
//
53+
// protected function createIndexName($type, array $columns): string
54+
// {
55+
// return '';
56+
// }
57+
//
58+
// protected function dropIndexCommand($command, $type, $index): Fluent
59+
// {
60+
// return new Fluent();
61+
// }
62+
// }
63+
//
64+
// /**
65+
// * @method ColumnDefinition using($expression)
66+
// */
67+
// class ColumnDefinition extends Fluent
68+
// {
69+
// }
70+
//}

tests/Unit/Helpers/BlueprintAssertions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Umbrellio\Postgres\Tests\Unit\Helpers;
66

7+
use Mockery;
78
use PHPUnit\Framework\TestCase;
89
use Umbrellio\Postgres\PostgresConnection;
910
use Umbrellio\Postgres\Schema\Blueprint;
@@ -26,7 +27,8 @@ trait BlueprintAssertions
2627

2728
public function initializeMock(string $table)
2829
{
29-
$this->postgresConnection = $this->createMock(PostgresConnection::class);
30+
$connection = Mockery::mock(PostgresConnection::class);
31+
$this->postgresConnection = $connection->makePartial();
3032
$this->postgresGrammar = new PostgresGrammar($this->postgresConnection);
3133
$this->postgresConnection->setSchemaGrammar($this->postgresGrammar);
3234
$this->blueprint = new Blueprint($this->postgresConnection, $table);

0 commit comments

Comments
 (0)