-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbed6a1
commit bda07b1
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace FoF\FollowTags\tests\integration; | ||
|
||
trait ExtensionDepsTrait | ||
{ | ||
public function extensionDeps(): void | ||
{ | ||
$this->extension('flarum-tags'); | ||
$this->extension('fof-extend'); | ||
$this->extension('fof-follow-tags'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace FoF\FollowTags\tests\integration; | ||
|
||
use Flarum\Testing\integration\TestCase; | ||
use FoF\FollowTags\tests\integration\ExtensionDepsTrait; | ||
use FoF\FollowTags\tests\integration\TagsDefinitionTrait; | ||
|
||
class NotificationsTest extends TestCase | ||
{ | ||
use ExtensionDepsTrait; | ||
use TagsDefinitionTrait; | ||
|
||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->extensionDeps(); | ||
|
||
$this->prepareDatabase([ | ||
'tags' => $this->tags(), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace FoF\FollowTags\tests\integration; | ||
|
||
trait TagsDefinitionTrait | ||
{ | ||
public function tags(): array | ||
{ | ||
return [ | ||
['id' => 1, 'name' => 'General', 'slug' => 'general', 'position' => 0, 'parent_id' => null], | ||
['id' => 2, 'name' => 'Testing', 'slug' => 'testing', 'position' => 1, 'parent_id' => null], | ||
['id' => 3, 'name' => 'Archive', 'slug' => 'archive', 'position' => 2, 'parent_id' => null, 'is_restricted' => true], | ||
]; | ||
} | ||
} |