-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Showing
12 changed files
with
423 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,31 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\System; | ||
|
||
use AltThree\TestBench\EventTrait; | ||
use CachetHQ\Cachet\Bus\Events\System\SystemEventInterface; | ||
use CachetHQ\Tests\Cachet\AbstractTestCase; | ||
|
||
/** | ||
* This is the abstract system event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
abstract class AbstractSystemEventTestCase extends AbstractTestCase | ||
{ | ||
use EventTrait; | ||
|
||
protected function getEventInterfaces() | ||
{ | ||
return [SystemEventInterface::class]; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
tests/Bus/Events/System/SystemCheckedForUpdatesEventTest.php
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,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\System; | ||
|
||
use CachetHQ\Cachet\Bus\Events\System\SystemCheckedForUpdatesEvent; | ||
|
||
/** | ||
* This is the system checked for updates event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class SystemCheckedForUpdatesEventTest extends AbstractSystemEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = []; | ||
$object = new SystemCheckedForUpdatesEvent(); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\System; | ||
|
||
use CachetHQ\Cachet\Bus\Events\System\SystemWasInstalledEvent; | ||
|
||
/** | ||
* This is the system was installed event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class SystemWasInstalledEventTest extends AbstractSystemEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = []; | ||
$object = new SystemWasInstalledEvent(); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\System; | ||
|
||
use CachetHQ\Cachet\Bus\Events\System\SystemWasResetEvent; | ||
|
||
/** | ||
* This is the system was reset event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class SystemWasResetEventTest extends AbstractSystemEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = []; | ||
$object = new SystemWasResetEvent(); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\System; | ||
|
||
use CachetHQ\Cachet\Bus\Events\System\SystemWasUpdatedEvent; | ||
|
||
/** | ||
* This is the system was updated event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class SystemWasUpdatedEventTest extends AbstractSystemEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = []; | ||
$object = new SystemWasUpdatedEvent(); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserDisabledTwoAuthEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user disabled two auth event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserDisabledTwoAuthEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserDisabledTwoAuthEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserEnabledTwoAuthEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user enabled two auth event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserEnabledTwoAuthEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserEnabledTwoAuthEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserFailedTwoAuthEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user failed two auth event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserFailedTwoAuthEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserFailedTwoAuthEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserLoggedInEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user logged in event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserLoggedInEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserLoggedInEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserLoggedOutEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user logged out event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserLoggedOutEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserLoggedOutEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Cachet. | ||
* | ||
* (c) Alt Three Services Limited | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CachetHQ\Tests\Cachet\Bus\Events\User; | ||
|
||
use CachetHQ\Cachet\Bus\Events\User\UserPassedTwoAuthEvent; | ||
use CachetHQ\Cachet\Models\User; | ||
|
||
/** | ||
* This is the user passed two auth event test class. | ||
* | ||
* @author James Brooks <james@alt-three.com> | ||
*/ | ||
class UserPassedTwoAuthEventTest extends AbstractUserEventTestCase | ||
{ | ||
protected function objectHasHandlers() | ||
{ | ||
return false; | ||
} | ||
|
||
protected function getObjectAndParams() | ||
{ | ||
$params = ['user' => new User()]; | ||
$object = new UserPassedTwoAuthEvent($params['user']); | ||
|
||
return compact('params', 'object'); | ||
} | ||
} |
Oops, something went wrong.