Skip to content

Commit

Permalink
chore: fix SA
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Dec 5, 2022
1 parent 6ebc085 commit 6745126
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/Integration/Examples/PublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ final class PublisherTest extends TestCase
*/
public function testPublishJob(): void
{
if (empty(SERVER_HOST)) {
$this->markTestSkipped('No SERVER_HOST configured');
if (SERVER_HOST === '') {
self::markTestSkipped('No SERVER_HOST configured');
}
$pheanstalk = PheanstalkPublisher::create(SERVER_HOST);

Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/PheanstalkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ public function testKickKicksDelayedJobWhenNoJobsAreBuried(): void
final protected function getHost(): string
{
if (str_contains(static::class, "Unix")) {
if (empty(UNIX_SERVER_HOST)) {
$this->markTestSkipped('No Unix socket configured via UNIX_SERVER_HOST');
if (UNIX_SERVER_HOST === '') {
self::markTestSkipped('No Unix socket configured via UNIX_SERVER_HOST');
}
return UNIX_SERVER_HOST;
} elseif (empty(SERVER_HOST)) {
$this->markTestSkipped('No server host configured via SERVER_HOST');
} elseif (SERVER_HOST === '') {
self::markTestSkipped('No server host configured via SERVER_HOST');
}
return SERVER_HOST;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/SocketFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ final class SocketFactoryTest extends TestCase
*/
public function factoryProvider(): iterable
{
if (!empty(SERVER_HOST)) {
if (SERVER_HOST !== '') {
yield [new SocketFactory(SERVER_HOST, implementation: SocketImplementation::SOCKET), SocketSocket::class];
yield [new SocketFactory(SERVER_HOST, implementation: SocketImplementation::STREAM), StreamSocket::class];
yield [
new SocketFactory(SERVER_HOST, implementation: SocketImplementation::FSOCKOPEN),
FsockopenSocket::class
];
}
if (!empty(UNIX_SERVER_HOST)) {
if (UNIX_SERVER_HOST !== '') {
yield [
new SocketFactory(UNIX_SERVER_HOST, implementation: SocketImplementation::SOCKET),
SocketSocket::class
Expand Down

0 comments on commit 6745126

Please sign in to comment.