Skip to content

Commit

Permalink
Adds TLS config validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Sep 10, 2017
1 parent 0c04343 commit 661ed82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Unit/Validators/ConfigFileValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ public function testFailsIfMessageQueueServerNetworkSocketIsInvalid() : void
$this->assertNotEmpty( $validator->getMessages() );
}

public function testFailsIfMessageQueueServerTlsSocketIsInvalid() : void
{
$validator = new ConfigFileValidator( __DIR__ . '/Fixtures/invalid-message-queue-server-tls-socket.xml' );

$this->assertTrue( $validator->failed() );
$this->assertNotEmpty( $validator->getMessages() );
}

public function testFailsIfMessageQueueServerUnixSocketIsInvalid() : void
{
$validator = new ConfigFileValidator( __DIR__ . '/Fixtures/invalid-message-queue-server-unix-socket.xml' );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PHPMQ>
<servers>
<messagequeue>
<tls/>
</messagequeue>
</servers>
</PHPMQ>

0 comments on commit 661ed82

Please sign in to comment.