Skip to content

Commit ab045e0

Browse files
committed
Update covers-validator and phpunit
1 parent f53d9de commit ab045e0

6 files changed

Lines changed: 14 additions & 10 deletions

File tree

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"wikimedia/assert": "~0.2.2|~0.3.0|~0.4.0"
3333
},
3434
"require-dev": {
35-
"ockcyp/covers-validator": "~0.5.0",
35+
"ockcyp/covers-validator": "~1.1",
3636
"phpmd/phpmd": "~2.6",
37-
"phpunit/phpunit": "~5.7",
37+
"phpunit/phpunit": "~8.0",
3838
"wikibase/wikibase-codesniffer": "~1.1.0"
3939
},
4040
"autoload": {
@@ -58,7 +58,7 @@
5858
"scripts": {
5959
"test": [
6060
"composer validate --no-interaction",
61-
"vendor/bin/phpunit",
61+
"phpunit",
6262
"covers-validator"
6363
],
6464
"cs": [

tests/unit/Assert/RepositoryNameAssertTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function provideValidRepositoryNames() {
5050
*/
5151
public function testGivenValidValue_assertParameterIsValidRepositoryNamePasses( $value ) {
5252
RepositoryNameAssert::assertParameterIsValidRepositoryName( $value, 'test' );
53+
$this->assertTrue( true );
5354
}
5455

5556
public function provideInvalidRepositoryNameIndexedArrays() {
@@ -84,6 +85,7 @@ public function provideValidRepositoryNameIndexedArrays() {
8485
*/
8586
public function testGivenValidValue_assertParameterKeysAreValidRepositoryNamesPasses( array $values ) {
8687
RepositoryNameAssert::assertParameterKeysAreValidRepositoryNames( $values, 'test' );
88+
$this->assertTrue( true );
8789
}
8890

8991
}

tests/unit/ReferenceListTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public function testRemoveReference( ReferenceList $array ) {
146146
$this->assertFalse( $array->hasReference( $element ) );
147147
$this->assertSame( --$elementCount, count( $array ) );
148148
}
149+
if ( $elementCount === 0 ) {
150+
$this->assertTrue( true );
151+
}
149152
}
150153

151154
public function testRemoveReferenceRemovesIdenticalObjects() {

tests/unit/SiteLinkListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function testCanConstructWithIterable() {
347347
}
348348

349349
public function testWhenProvidingNonIterable_constructorThrowsException() {
350-
$this->setExpectedException( InvalidArgumentException::class );
350+
$this->expectException( InvalidArgumentException::class );
351351
new SiteLinkList( new SiteLink( 'enwiki', 'foo' ) );
352352
}
353353

tests/unit/Snak/SnakTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
* @covers \Wikibase\DataModel\Snak\PropertyNoValueSnak
1515
* @covers \Wikibase\DataModel\Snak\PropertySomeValueSnak
1616
* @covers \Wikibase\DataModel\Snak\PropertyValueSnak
17-
* @covers \Wikibase\DataModel\Snak\Snak
1817
* @uses \Wikibase\DataModel\Snak\SnakObject
19-
* @uses DataValues\NumberValue
20-
* @uses DataValues\StringValue
18+
* @uses \DataValues\NumberValue
19+
* @uses \DataValues\StringValue
2120
* @uses \Wikibase\DataModel\Entity\EntityId
2221
* @uses \Wikibase\DataModel\Entity\PropertyId
2322
*

tests/unit/Term/TermListTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,21 +468,21 @@ public function testCanConstructWithIterables() {
468468
}
469469

470470
public function testWhenProvidingNonTerms_constructorThrowsException() {
471-
$this->setExpectedException( InvalidArgumentException::class );
471+
$this->expectException( InvalidArgumentException::class );
472472
new TermList( [ 'no-a-term' ] );
473473
}
474474

475475
public function testWhenProvidingNonTerms_addAllThrowsException() {
476476
$list = new TermList( [] );
477477

478-
$this->setExpectedException( InvalidArgumentException::class );
478+
$this->expectException( InvalidArgumentException::class );
479479
$list->addAll( [ 'no-a-term' ] );
480480
}
481481

482482
public function testWhenProvidingNonIterable_addAllThrowsException() {
483483
$list = new TermList( [] );
484484

485-
$this->setExpectedException( InvalidArgumentException::class );
485+
$this->expectException( InvalidArgumentException::class );
486486
$list->addAll( new Term( 'en', 'foo' ) );
487487
}
488488

0 commit comments

Comments
 (0)