|
@@ 89-102 (lines=14) @@
|
| 86 |
|
self::assertFalse($unique->isFullfilledBy($primary)); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
public function testFulfilledWithPartial() |
| 90 |
|
{ |
| 91 |
|
$without = new Index('without', array('col1', 'col2'), true, false, array(), array()); |
| 92 |
|
$partial = new Index('partial', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL')); |
| 93 |
|
$another = new Index('another', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL')); |
| 94 |
|
|
| 95 |
|
$this->assertFalse($partial->isFullfilledBy($without)); |
| 96 |
|
$this->assertFalse($without->isFullfilledBy($partial)); |
| 97 |
|
|
| 98 |
|
$this->assertTrue($partial->isFullfilledBy($partial)); |
| 99 |
|
|
| 100 |
|
$this->assertTrue($partial->isFullfilledBy($another)); |
| 101 |
|
$this->assertTrue($another->isFullfilledBy($partial)); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
public function testFulfilledByCompounded() |
| 105 |
|
{ |
|
@@ 113-126 (lines=14) @@
|
| 110 |
|
self::assertFalse($compounded->isFullfilledBy($single)); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testOverrulesWithPartial() |
| 114 |
|
{ |
| 115 |
|
$without = new Index('without', array('col1', 'col2'), true, false, array(), array()); |
| 116 |
|
$partial = new Index('partial', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL')); |
| 117 |
|
$another = new Index('another', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL')); |
| 118 |
|
|
| 119 |
|
$this->assertFalse($partial->overrules($without)); |
| 120 |
|
$this->assertFalse($without->overrules($partial)); |
| 121 |
|
|
| 122 |
|
$this->assertTrue($partial->overrules($partial)); |
| 123 |
|
|
| 124 |
|
$this->assertTrue($partial->overrules($another)); |
| 125 |
|
$this->assertTrue($another->overrules($partial)); |
| 126 |
|
} |
| 127 |
|
|
| 128 |
|
/** |
| 129 |
|
* @group DBAL-220 |