@@ -79,9 +79,9 @@ protected function setUp(): void
7979 /**
8080 * Get message object, creating it lazily
8181 *
82- * @return AsyncTestData
82+ * @return object
8383 */
84- private function getMsgObject (): AsyncTestData
84+ private function getMsgObject (): object
8585 {
8686 if (!$ this ->msgObject ) {
8787 // phpstan:ignore "Class Magento\TestModuleAsyncStomp\Model\AsyncTestData not found."
@@ -95,9 +95,8 @@ private function getMsgObject(): AsyncTestData
9595 */
9696 public function testWaitForMessages (): void
9797 {
98- if ($ this ->connectionType === 'amqp ' ) {
99- $ this ->markTestSkipped ('STOMP test skipped because AMQP connection is available.
100- This test is STOMP-specific. ' );
98+ if ($ this ->connectionType !== 'stomp ' ) {
99+ $ this ->markTestSkipped ('This test is STOMP-specific and requires STOMP connection. ' );
101100 }
102101
103102 $ this ->publisherConsumerController ->stopConsumers ();
@@ -132,8 +131,7 @@ public function testWaitForMessages(): void
132131 public function testNotWaitForMessages (): void
133132 {
134133 if ($ this ->connectionType !== 'stomp ' ) {
135- $ this ->markTestSkipped ('STOMP test skipped because AMQP connection is available.
136- This test is STOMP-specific. ' );
134+ $ this ->markTestSkipped ('This test is STOMP-specific and requires STOMP connection. ' );
137135 }
138136
139137 $ this ->publisherConsumerController ->stopConsumers ();
@@ -196,7 +194,9 @@ private function writeConfig(array $config): void
196194 */
197195 protected function tearDown (): void
198196 {
197+ if ($ this ->config !== null ) {
198+ $ this ->writeConfig ($ this ->config );
199+ }
199200 parent ::tearDown ();
200- $ this ->writeConfig ($ this ->config );
201201 }
202202}
0 commit comments