Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Add some tests that would have discovered #1
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 1, 2016
1 parent c7cd646 commit 4a8df3f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ nsca ChangeLog

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

## 5.1.1 / 2016-10-01

* Fixed issue #1: Wrong constant name - @emil-nasso, @thekid

## 5.1.0 / 2016-08-28

* Added forward compatibility with XP 8.0.0 - @thekid
Expand Down
20 changes: 20 additions & 0 deletions src/test/php/org/nagios/unittest/NscaClientTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@
*/
class NscaClientTest extends \unittest\TestCase {

#[@test]
public function can_create_with_host() {
$client= new NscaClient('nagios.xp-framework.net');
}

#[@test]
public function can_create_with_host_and_port() {
$client= new NscaClient('nagios.xp-framework.net', 5667);
}

#[@test]
public function can_create_with_host_port_and_version() {
$client= new NscaClient('nagios.xp-framework.net', 5667, NscaProtocol::VERSION_3);
}

#[@test]
public function can_create_with_host_port_and_version_and_crypt() {
$client= new NscaClient('nagios.xp-framework.net', 5667, NscaProtocol::VERSION_3, NscaProtocol::CRYPT_XOR);
}

#[@test]
public function encrypt() {
$client= new NscaClient('nagios.xp-framework.net', 5667, NscaProtocol::VERSION_3, NscaProtocol::CRYPT_XOR);
Expand Down

0 comments on commit 4a8df3f

Please sign in to comment.