Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/sets/annotations-to-attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
new AnnotationToAttribute('doesNotPerformAssertions', 'PHPUnit\Framework\Attributes\DoesNotPerformAssertions'),
new AnnotationToAttribute('large', 'PHPUnit\Framework\Attributes\Large'),
new AnnotationToAttribute('medium', 'PHPUnit\Framework\Attributes\Medium'),
new AnnotationToAttribute('preCondition', 'PHPUnit\Framework\Attributes\PostCondition'),
new AnnotationToAttribute('postCondition', 'PHPUnit\Framework\Attributes\PreCondition'),
new AnnotationToAttribute('preCondition', 'PHPUnit\Framework\Attributes\PreCondition'),
new AnnotationToAttribute('postCondition', 'PHPUnit\Framework\Attributes\PostCondition'),
new AnnotationToAttribute('runInSeparateProcess', 'PHPUnit\Framework\Attributes\RunInSeparateProcess'),
new AnnotationToAttribute(
'runTestsInSeparateProcesses',
Expand Down
41 changes: 41 additions & 0 deletions tests/AnnotationsToAttributes/Fixture/pre_post_condition.php.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

use PHPUnit\Framework\TestCase;

class PrePostConditionTest extends TestCase
{
/**
* @preCondition
*/
protected function setUpSomething()
{
}

/**
* @postCondition
*/
protected function tearDownSomething()
{
}
}

?>
-----
<?php

use PHPUnit\Framework\TestCase;

class PrePostConditionTest extends TestCase
{
#[\PHPUnit\Framework\Attributes\PreCondition]
protected function setUpSomething()
{
}

#[\PHPUnit\Framework\Attributes\PostCondition]
protected function tearDownSomething()
{
}
}

?>
Loading