|
25 | 25 | class ReferenceListTest extends PHPUnit_Framework_TestCase { |
26 | 26 |
|
27 | 27 | public function instanceProvider() { |
28 | | - $instances = array(); |
29 | | - |
30 | | - foreach ( $this->getConstructorArg() as $arg ) { |
31 | | - $instances[] = array( new ReferenceList( $arg ) ); |
32 | | - } |
33 | | - |
34 | | - return $instances; |
35 | | - } |
36 | | - |
37 | | - public function getElementInstances() { |
38 | | - return array( |
39 | | - new Reference(), |
40 | | - new Reference( array( new PropertyNoValueSnak( 2 ) ) ), |
41 | | - new Reference( array( new PropertyNoValueSnak( 3 ) ) ), |
42 | | - ); |
43 | | - } |
44 | | - |
45 | | - public function getConstructorArg() { |
46 | 28 | return array( |
47 | | - array(), |
48 | | - $this->getElementInstances(), |
| 29 | + array( new ReferenceList( array() ) ), |
| 30 | + array( new ReferenceList( array( |
| 31 | + new Reference(), |
| 32 | + new Reference( array( new PropertyNoValueSnak( 2 ) ) ), |
| 33 | + new Reference( array( new PropertyNoValueSnak( 3 ) ) ), |
| 34 | + ) ) ), |
49 | 35 | ); |
50 | 36 | } |
51 | 37 |
|
@@ -147,14 +133,6 @@ public function testRemoveReference( ReferenceList $array ) { |
147 | 133 | $this->assertFalse( $array->hasReference( $element ) ); |
148 | 134 | $this->assertEquals( --$elementCount, count( $array ) ); |
149 | 135 | } |
150 | | - |
151 | | - $elements = $this->getElementInstances(); |
152 | | - $element = array_shift( $elements ); |
153 | | - |
154 | | - $array->removeReference( $element ); |
155 | | - $array->removeReference( $element ); |
156 | | - |
157 | | - $this->assertTrue( true ); |
158 | 136 | } |
159 | 137 |
|
160 | 138 | public function testRemoveReferenceRemovesIdenticalObjects() { |
|
0 commit comments