Skip to content

Commit

Permalink
Refrain from using deprecated annotation key/value pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Apr 5, 2020
1 parent cd66199 commit f37007c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ stomp ChangeLog

## ?.?.? / ????-??-??

## 10.1.3 / 2020-04-05

* Implemented RFC #335: Remove deprecated key/value pair annotation syntax
(@thekid)

## 10.1.2 / 2020-04-04

* Made compatible with XP 10 - @thekid
Expand Down
5 changes: 3 additions & 2 deletions src/test/php/peer/stomp/unittest/MessageTest.class.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace peer\stomp\unittest;

use lang\IllegalStateException;
use peer\stomp\Destination;
use peer\stomp\Message;
use peer\stomp\ReceivedMessage;
Expand Down Expand Up @@ -162,13 +163,13 @@ public function nack_in_transaction() {
);
}

#[@test, @expect(class= 'lang.IllegalStateException', withMessage= '/Cannot ack message without connection/')]
#[@test, @expect(['class' => IllegalStateException::class, 'withMessage' => '/Cannot ack message without connection/'])]
public function ack_fails_without_connection() {
$m= new ReceivedMessage();
$m->ack();
}

#[@test, @expect(class= 'lang.IllegalStateException', withMessage= '/Cannot ack message without connection/')]
#[@test, @expect(['class' => IllegalStateException::class, 'withMessage' => '/Cannot ack message without connection/'])]
public function nack_fails_without_connection() {
$m= new ReceivedMessage();
$m->nack();
Expand Down
6 changes: 4 additions & 2 deletions src/test/php/peer/stomp/unittest/StompTest.class.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php namespace peer\stomp\unittest;

use lang\IllegalArgumentException;
use peer\AuthenticationException;
use peer\ProtocolException;
use peer\URL;
use peer\stomp\Connection;
use peer\stomp\Destination;
use peer\stomp\Exception;
use peer\stomp\frame\AbortFrame;
use peer\stomp\frame\AckFrame;
use peer\stomp\frame\BeginFrame;
Expand Down Expand Up @@ -113,7 +115,7 @@ public function connect_and_negotiate_version_but_fails() {
);
}

#[@test, @expect(class= 'lang.IllegalArgumentException', withMessage= '/Invalid protocol version/')]
#[@test, @expect(['class' => IllegalArgumentException::class, 'withMessage' => '/Invalid protocol version/'])]
public function connect_requires_valid_version() {
$this->newConnection(new URL('stomp://user:pass@host?versions='))->connect();
}
Expand Down Expand Up @@ -206,7 +208,7 @@ public function recv_eats_any_empty_line_between_frames() {
$this->assertInstanceOf(MessageFrame::class, $recvd[1]);
}

#[@test, @expect(class= 'peer.stomp.Exception', withMessage= '/ACK received without/')]
#[@test, @expect(['class' => Exception::class, 'withMessage' => '/ACK received without/'])]
public function receive_throws_exception_on_error_frame() {
$this->fixture->setResponseBytes("ERROR\n".
"message:ACK received without a subscription id for acknowledge!\n".
Expand Down

0 comments on commit f37007c

Please sign in to comment.