Skip to content

Commit a1d8751

Browse files
TomasVotrubajaapio
authored andcommitted
tests: add strict_types and typehints, remove tests that are now covered by typehints
1 parent d874c4d commit a1d8751

32 files changed

+66
-81
lines changed

tests/integration/DocblocksWithAnnotationsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/integration/InterpretingDocBlocksTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/integration/ReconstitutingADocBlockTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/integration/UsingTagsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/unit/DocBlock/DescriptionFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/unit/DocBlock/DescriptionTest.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*
@@ -124,13 +125,4 @@ public function testDescriptionMultipleTagsCanBeCastToString()
124125
$expected = '@JoinTable(name="table", joinColumns={@JoinColumn (name="column_id", referencedColumnName="id")}, inverseJoinColumns={@JoinColumn (name="column_id_2", referencedColumnName="id")})';
125126
$this->assertSame($expected, (string)$fixture);
126127
}
127-
128-
/**
129-
* @covers ::__construct
130-
* @expectedException \InvalidArgumentException
131-
*/
132-
public function testBodyTemplateMustBeAString()
133-
{
134-
new Description([]);
135-
}
136128
}

tests/unit/DocBlock/ExampleFinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare(strict_types=1);
22

33
namespace phpDocumentor\Reflection\DocBlock;
44

tests/unit/DocBlock/SerializerTest.php

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*
@@ -198,40 +199,4 @@ public function testNoExtraSpacesAfterTagRemoval()
198199
$docBlock->removeTag($genericTag);
199200
$this->assertSame($expectedAfterRemove, $fixture->getDocComment($docBlock));
200201
}
201-
202-
/**
203-
* @covers ::__construct
204-
* @expectedException \InvalidArgumentException
205-
*/
206-
public function testInitializationFailsIfIndentIsNotAnInteger()
207-
{
208-
new Serializer([]);
209-
}
210-
211-
/**
212-
* @covers ::__construct
213-
* @expectedException \InvalidArgumentException
214-
*/
215-
public function testInitializationFailsIfIndentStringIsNotAString()
216-
{
217-
new Serializer(0, []);
218-
}
219-
220-
/**
221-
* @covers ::__construct
222-
* @expectedException \InvalidArgumentException
223-
*/
224-
public function testInitializationFailsIfIndentFirstLineIsNotABoolean()
225-
{
226-
new Serializer(0, '', []);
227-
}
228-
229-
/**
230-
* @covers ::__construct
231-
* @expectedException \InvalidArgumentException
232-
*/
233-
public function testInitializationFailsIfLineLengthIsNotNullNorAnInteger()
234-
{
235-
new Serializer(0, '', false, []);
236-
}
237202
}

tests/unit/DocBlock/StandardTagFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

tests/unit/DocBlock/Tags/AuthorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php
1+
<?php declare(strict_types=1);
2+
23
/**
34
* This file is part of phpDocumentor.
45
*

0 commit comments

Comments
 (0)