comparison core/modules/system/tests/src/Unit/SystemRequirementsTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Tests\system\Unit;
4
5 use Drupal\system\SystemRequirements;
6 use Drupal\Tests\UnitTestCase;
7
8 /**
9 * @coversDefaultClass \Drupal\system\SystemRequirements
10 * @group system
11 */
12 class SystemRequirementsTest extends UnitTestCase {
13
14 /**
15 * @covers ::phpVersionWithPdoDisallowMultipleStatements
16 * @dataProvider providerTestPhpVersionWithPdoDisallowMultipleStatements
17 */
18 public function testPhpVersionWithPdoDisallowMultipleStatements($version, $expected) {
19 $this->assertEquals($expected, SystemRequirements::phpVersionWithPdoDisallowMultipleStatements($version));
20 }
21
22 public function providerTestPhpVersionWithPdoDisallowMultipleStatements() {
23 $data = [];
24 $data[] = ['5.4.2', FALSE];
25 $data[] = ['5.4.21', FALSE];
26 $data[] = ['5.5.9', FALSE];
27 $data[] = ['5.5.20', FALSE];
28 $data[] = ['5.5.21', TRUE];
29 $data[] = ['5.5.30', TRUE];
30 $data[] = ['5.6.2', FALSE];
31 $data[] = ['5.6.5', TRUE];
32 $data[] = ['5.5.21', TRUE];
33 return $data;
34 }
35
36 }