File tree 12 files changed +423
-0
lines changed
12 files changed +423
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \System ;
13
+
14
+ use AltThree \TestBench \EventTrait ;
15
+ use CachetHQ \Cachet \Bus \Events \System \SystemEventInterface ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the abstract system event test class.
20
+ *
21
+ * @author James Brooks <james@alt-three.com>
22
+ */
23
+ abstract class AbstractSystemEventTestCase extends AbstractTestCase
24
+ {
25
+ use EventTrait;
26
+
27
+ protected function getEventInterfaces ()
28
+ {
29
+ return [SystemEventInterface::class];
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \System ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \System \SystemCheckedForUpdatesEvent ;
15
+
16
+ /**
17
+ * This is the system checked for updates event test class.
18
+ *
19
+ * @author James Brooks <james@alt-three.com>
20
+ */
21
+ class SystemCheckedForUpdatesEventTest extends AbstractSystemEventTestCase
22
+ {
23
+ protected function objectHasHandlers ()
24
+ {
25
+ return false ;
26
+ }
27
+
28
+ protected function getObjectAndParams ()
29
+ {
30
+ $ params = [];
31
+ $ object = new SystemCheckedForUpdatesEvent ();
32
+
33
+ return compact ('params ' , 'object ' );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \System ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \System \SystemWasInstalledEvent ;
15
+
16
+ /**
17
+ * This is the system was installed event test class.
18
+ *
19
+ * @author James Brooks <james@alt-three.com>
20
+ */
21
+ class SystemWasInstalledEventTest extends AbstractSystemEventTestCase
22
+ {
23
+ protected function objectHasHandlers ()
24
+ {
25
+ return false ;
26
+ }
27
+
28
+ protected function getObjectAndParams ()
29
+ {
30
+ $ params = [];
31
+ $ object = new SystemWasInstalledEvent ();
32
+
33
+ return compact ('params ' , 'object ' );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \System ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \System \SystemWasResetEvent ;
15
+
16
+ /**
17
+ * This is the system was reset event test class.
18
+ *
19
+ * @author James Brooks <james@alt-three.com>
20
+ */
21
+ class SystemWasResetEventTest extends AbstractSystemEventTestCase
22
+ {
23
+ protected function objectHasHandlers ()
24
+ {
25
+ return false ;
26
+ }
27
+
28
+ protected function getObjectAndParams ()
29
+ {
30
+ $ params = [];
31
+ $ object = new SystemWasResetEvent ();
32
+
33
+ return compact ('params ' , 'object ' );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \System ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \System \SystemWasUpdatedEvent ;
15
+
16
+ /**
17
+ * This is the system was updated event test class.
18
+ *
19
+ * @author James Brooks <james@alt-three.com>
20
+ */
21
+ class SystemWasUpdatedEventTest extends AbstractSystemEventTestCase
22
+ {
23
+ protected function objectHasHandlers ()
24
+ {
25
+ return false ;
26
+ }
27
+
28
+ protected function getObjectAndParams ()
29
+ {
30
+ $ params = [];
31
+ $ object = new SystemWasUpdatedEvent ();
32
+
33
+ return compact ('params ' , 'object ' );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserDisabledTwoAuthEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user disabled two auth event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserDisabledTwoAuthEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserDisabledTwoAuthEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserEnabledTwoAuthEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user enabled two auth event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserEnabledTwoAuthEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserEnabledTwoAuthEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserFailedTwoAuthEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user failed two auth event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserFailedTwoAuthEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserFailedTwoAuthEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserLoggedInEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user logged in event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserLoggedInEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserLoggedInEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserLoggedOutEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user logged out event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserLoggedOutEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserLoggedOutEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserPassedTwoAuthEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user passed two auth event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserPassedTwoAuthEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserPassedTwoAuthEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Bus \Events \User ;
13
+
14
+ use CachetHQ \Cachet \Bus \Events \User \UserRegeneratedApiTokenEvent ;
15
+ use CachetHQ \Cachet \Models \User ;
16
+
17
+ /**
18
+ * This is the user regenerated api token event test class.
19
+ *
20
+ * @author James Brooks <james@alt-three.com>
21
+ */
22
+ class UserRegeneratedApiTokenEventTest extends AbstractUserEventTestCase
23
+ {
24
+ protected function objectHasHandlers ()
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ protected function getObjectAndParams ()
30
+ {
31
+ $ params = ['user ' => new User ()];
32
+ $ object = new UserRegeneratedApiTokenEvent ($ params ['user ' ]);
33
+
34
+ return compact ('params ' , 'object ' );
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments