Skip to content
Permalink
Browse files

remove specific php5.5 code

  • Loading branch information...
antograssiot committed Aug 20, 2016
1 parent b38262c commit 83add78952e6ab790477310b60cf9f36dfd0dfcb
@@ -198,14 +198,8 @@ protected function _setSslContext($host)
if (!isset($this->_config['context']['ssl']['SNI_enabled'])) {
$this->_config['context']['ssl']['SNI_enabled'] = true;
}
if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
if (empty($this->_config['context']['ssl']['peer_name'])) {
$this->_config['context']['ssl']['peer_name'] = $host;
}
} else {
if (empty($this->_config['context']['ssl']['SNI_server_name'])) {
$this->_config['context']['ssl']['SNI_server_name'] = $host;
}
if (empty($this->_config['context']['ssl']['peer_name'])) {
$this->_config['context']['ssl']['peer_name'] = $host;
}
if (empty($this->_config['context']['ssl']['cafile'])) {
$dir = dirname(dirname(__DIR__));
@@ -127,11 +127,7 @@ public static function schemaValueProvider()
public function testSchemaValue($input, $expected)
{
$driver = new Sqlite();
$pdo = PDO::class;
if (version_compare(PHP_VERSION, '5.6', '<')) {
$pdo = 'FakePdo';
}
$mock = $this->getMockBuilder($pdo)
$mock = $this->getMockBuilder(PDO::class)
->setMethods(['quote', 'quoteIdentifier'])
->disableOriginalConstructor()
->getMock();
@@ -1231,11 +1231,7 @@ public function testDescribeJson()
protected function _getMockedDriver()
{
$driver = new Mysql();
$pdo = PDO::class;
if (version_compare(PHP_VERSION, '5.6', '<')) {
$pdo = 'FakePdo';
}
$mock = $this->getMockBuilder($pdo)
$mock = $this->getMockBuilder(PDO::class)
->setMethods(['quote', 'quoteIdentifier', 'getAttribute'])
->disableOriginalConstructor()
->getMock();
@@ -1199,11 +1199,7 @@ public function testTruncateSql()
protected function _getMockedDriver()
{
$driver = new Postgres();
$pdo = PDO::class;
if (version_compare(PHP_VERSION, '5.6', '<')) {
$pdo = 'FakePdo';
}
$mock = $this->getMockBuilder($pdo)
$mock = $this->getMockBuilder(PDO::class)
->setMethods(['quote'])
->disableOriginalConstructor()
->getMock();
@@ -1032,11 +1032,7 @@ public function testTruncateSqlNoSequences()
protected function _getMockedDriver()
{
$driver = new Sqlite();
$pdo = PDO::class;
if (version_compare(PHP_VERSION, '5.6', '<')) {
$pdo = 'FakePdo';
}
$mock = $this->getMockBuilder($pdo)
$mock = $this->getMockBuilder(PDO::class)
->setMethods(['quote', 'prepare'])
->disableOriginalConstructor()
->getMock();
@@ -952,11 +952,7 @@ public function testTruncateSql()
protected function _getMockedDriver()
{
$driver = new Sqlserver();
$pdo = PDO::class;
if (version_compare(PHP_VERSION, '5.6', '<')) {
$pdo = 'FakePdo';
}
$mock = $this->getMockBuilder($pdo)
$mock = $this->getMockBuilder(PDO::class)
->setMethods(['quote'])
->disableOriginalConstructor()
->getMock();
@@ -405,10 +405,6 @@ public function testDispatchWithKeyName()
*/
public function testDispatchReturnValue()
{
$this->skipIf(
version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<'),
'These tests fail in PHPUnit 3.6'
);
$manager = new EventManager;
$listener = $this->getMockBuilder(__NAMESPACE__ . '\EventTestListener')
->getMock();
@@ -436,11 +432,6 @@ public function testDispatchReturnValue()
*/
public function testDispatchFalseStopsEvent()
{
$this->skipIf(
version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<'),
'These tests fail in PHPUnit 3.6'
);
$manager = new EventManager();
$listener = $this->getMockBuilder(__NAMESPACE__ . '\EventTestListener')
->getMock();

0 comments on commit 83add78

Please sign in to comment.
You can’t perform that action at this time.