for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare( strict_types = 1 );
namespace Coco\SourceWatcher\Tests\Core\Database\Connections;
use Coco\SourceWatcher\Core\Database\Connections\MySqlConnector;
use PHPUnit\Framework\TestCase;
/**
* Class ClientServerDatabaseConnectorTest
*/
class ClientServerDatabaseConnectorTest extends TestCase
{
*
public function testSetGetHost () : void
$connector = new MySqlConnector();
$given = "localhost";
$expected = "localhost";
$connector->setHost( $given );
$this->assertEquals( $expected, $connector->getHost() );
}
public function testSetGetPort () : void
$given = 3306;
$expected = 3306;
$connector->setPort( $given );
$this->assertEquals( $expected, $connector->getPort() );
public function testSetGetDbName () : void
$given = "test";
$expected = "test";
$connector->setDbName( $given );
$this->assertEquals( $expected, $connector->getDbName() );