Mongolid\Connection\PoolTest::testShouldAddConnectionToPool PHP Method

testShouldAddConnectionToPool() public method

    public function testShouldAddConnectionToPool()
    {
        // Arrange
        $pool = new Pool();
        $connQueue = m::mock();
        $connection = m::mock(Connection::class);
        $this->setProtected($pool, 'connections', $connQueue);
        // Act
        $connQueue->shouldReceive('push')->once()->with($connection);
        // Assert
        $this->assertTrue($pool->addConnection($connection));
    }