Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a8bad46

Browse files
committed
test refactoring
1 parent 7bdfce6 commit a8bad46

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

‎tests/NotionApiTest.php‎

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,9 @@ protected function getPackageAliases($app): array
3737
];
3838
}
3939

40-
41-
/** @test */
42-
public function it_returns_notion_instance_with_set_token_and_connection()
43-
{
44-
$notion = new Notion('secret_*');
45-
$notion->v1()->setToken('secret_*');
46-
47-
$this->assertInstanceOf(Notion::class, $notion);
48-
$this->assertNotEmpty($notion->getConnection());
49-
}
50-
51-
5240
/** @test */
53-
public function it_throws_a_handling_exception_invalid_version()
41+
public function it_asserts_true()
5442
{
55-
$this->expectException(HandlingException::class);
56-
$this->expectExceptionMessage('Invalid version for Notion-API endpoint');
57-
58-
new Notion('secret_*', 'v-does-not-exist');
43+
$this->assertTrue(true);
5944
}
6045
}

‎tests/NotionTest.php‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace FiveamCode\LaravelNotionApi\Tests;
4+
5+
6+
use FiveamCode\LaravelNotionApi\Exceptions\HandlingException;
7+
use FiveamCode\LaravelNotionApi\Notion;
8+
9+
class NotionTest extends NotionApiTest
10+
{
11+
12+
/** @test */
13+
public function it_returns_notion_instance_with_set_token_and_connection()
14+
{
15+
$notion = new Notion('secret_*');
16+
$notion->v1()->setToken('secret_*');
17+
18+
$this->assertInstanceOf(Notion::class, $notion);
19+
$this->assertNotEmpty($notion->getConnection());
20+
}
21+
22+
/** @test */
23+
public function it_throws_a_handling_exception_invalid_version()
24+
{
25+
$this->expectException(HandlingException::class);
26+
$this->expectExceptionMessage('Invalid version for Notion-API endpoint');
27+
28+
new Notion('secret_*', 'v-does-not-exist');
29+
}
30+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /