-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Uncaught Error: Cannot unset readonly property Pheanstalk\Socket…
…\SocketSocket::$socket in SocketSocket.php on line 138 (#258) * make socket property non read-only to fix error: Uncaught Error: Cannot unset readonly property Pheanstalk\Socket\SocketSocket::$socket in SocketSocket.php on line 138 * add test case for disconnect -> dispatchCommand not throwing errors * [fix-disconnect-error] change from abstract class to trait * [fix-disconnect-error] fix code style error --------- Co-authored-by: Anna Damm <anna.damm@check24.de>
- Loading branch information
1 parent
d98d10d
commit bee66a8
Showing
6 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Pheanstalk\Tests\Integration; | ||
|
||
use Pheanstalk\Command\UseCommand; | ||
use Pheanstalk\Connection; | ||
use Pheanstalk\Pheanstalk; | ||
use Pheanstalk\Values\TubeName; | ||
|
||
/** | ||
* @psalm-require-extends PheanstalkTestBase | ||
*/ | ||
trait ConstructWithConnectionObjectTests | ||
{ | ||
public function testDispatchCommandAfterDisconnect(): void | ||
{ | ||
$this->expectNotToPerformAssertions(); | ||
$connection = $this->getConnection(); | ||
$connection->connect(); | ||
$connection->disconnect(); | ||
|
||
$connection->dispatchCommand(new UseCommand(new TubeName('tube5'))); | ||
} | ||
|
||
protected function getPheanstalk(): Pheanstalk | ||
{ | ||
return new Pheanstalk($this->getConnection()); | ||
} | ||
|
||
abstract protected function getConnection(): Connection; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters