Browse Source
fix(docs): More specific event doc changing
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/10731/head
Joas Schilling
2 years ago
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
2 changed files with
7 additions and
1 deletions
-
lib/Events/CommandEvent.php
-
tests/php/EventDocumentationTest.php
|
|
|
@ -27,6 +27,9 @@ use OCA\Talk\Model\Command; |
|
|
|
use OCA\Talk\Room; |
|
|
|
use OCP\Comments\IComment; |
|
|
|
|
|
|
|
/** |
|
|
|
* @deprecated |
|
|
|
*/ |
|
|
|
class CommandEvent extends ChatEvent { |
|
|
|
protected string $output = ''; |
|
|
|
|
|
|
|
|
|
|
|
@ -59,7 +59,10 @@ class EventDocumentationTest extends TestCase { |
|
|
|
} |
|
|
|
|
|
|
|
$docs = file_get_contents(__DIR__ . '/../../docs/events.md'); |
|
|
|
$eventIsDocumented = str_contains($docs, '`' . $eventClass . '`'); |
|
|
|
$eventIsDocumented = str_contains($docs, 'Before event: `' . $eventClass . '`') |
|
|
|
|| str_contains($docs, 'After event: `' . $eventClass . '`') |
|
|
|
|| str_contains($docs, 'Final event: `' . $eventClass . '`') |
|
|
|
|| str_contains($docs, 'Event: `' . $eventClass . '`'); |
|
|
|
self::assertTrue($eventIsDocumented, 'Asserting that event ' . $eventClass . ' is documented'); |
|
|
|
} |
|
|
|
} |