File tree 4 files changed +95
-6
lines changed
4 files changed +95
-6
lines changed Original file line number Diff line number Diff line change 32
32
"require-dev" : {
33
33
"orchestra/testbench" : " ^6.0" ,
34
34
"pestphp/pest" : " ^1.22" ,
35
+ "pestphp/pest-plugin-laravel" : " ^1.3" ,
35
36
"phpunit/phpunit" : " ^9.0"
36
37
},
37
38
"autoload" : {
47
48
}
48
49
},
49
50
"scripts" : {
50
- "test" : " vendor/bin/phpunit" ,
51
- "test-coverage" : " vendor/bin/phpunit --coverage-html coverage"
52
-
51
+ "test" : " vendor/bin/pest" ,
52
+ "test-coverage" : " vendor/bin/pest --coverage-html coverage"
53
53
},
54
54
"config" : {
55
55
"sort-packages" : true
Original file line number Diff line number Diff line change 10
10
use Illuminate \Support \Collection ;
11
11
use Illuminate \Support \Facades \Http ;
12
12
13
-
14
13
/**
15
14
* Class EndpointDatabaseTest.
16
15
*
28
27
*/
29
28
30
29
it ('returns a database endpoint instance ' , function () {
30
+
31
31
// TODO make tests work again, update for new Filter behaviour
32
- $ endpoint = \FiveamCode \ LaravelNotionApi \ Notion::database ('897e5a76ae524b489fdfe71f5945d1af ' );
32
+ $ endpoint = \Notion::database ('897e5a76ae524b489fdfe71f5945d1af ' );
33
33
34
34
$ this ->assertInstanceOf (Database::class, $ endpoint );
35
35
});
Original file line number Diff line number Diff line change 2
2
3
3
namespace FiveamCode \LaravelNotionApi \Tests ;
4
4
5
+ use Illuminate \Database \Eloquent \Factories \Factory ;
5
6
use Orchestra \Testbench \TestCase as Orchestra ;
6
7
use FiveamCode \LaravelNotionApi \LaravelNotionApiServiceProvider ;
7
8
8
9
class TestCase extends Orchestra
9
10
{
11
+ protected function setUp (): void
12
+ {
13
+ parent ::setUp ();
14
+
15
+ Factory::guessFactoryNamesUsing (
16
+ fn (string $ modelName ) => 'VendorName \\Skeleton \\Database \\Factories \\' .class_basename ($ modelName ).'Factory '
17
+ );
18
+ }
19
+
10
20
protected function getPackageProviders ($ app )
11
21
{
12
22
return [
13
23
LaravelNotionApiServiceProvider::class,
14
24
];
15
25
}
26
+ public function getEnvironmentSetUp ($ app )
27
+ {
28
+ config ()->set ('database.default ' , 'testing ' );
29
+
30
+ /*
31
+ $migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub';
32
+ $migration->up();
33
+ */
34
+ }
16
35
}
You can’t perform that action at this time.
0 commit comments