Skip to content

Commit 72ba3ad

Browse files
committed
Split test methods.
1 parent 4d0d31d commit 72ba3ad

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/src/GetAttributesTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public function testSetReflector(): void {
3535
$reflector = new \ReflectionClass(TestClassWithAttributes::class);
3636
$attributes = get_attributes($reflector, ReflectorAwareTestAttribute::class);
3737
$this->assertSame($reflector, $attributes[0]->reflector);
38+
}
3839

40+
public function testNotSetReflector(): void {
41+
$reflector = new \ReflectionClass(TestClassWithAttributes::class);
3942
$attributes = get_raw_attributes($reflector, ReflectorAwareTestAttribute::class);
4043
$this->assertNull($attributes[0]->reflector);
4144
}
@@ -46,7 +49,10 @@ public function testGetReflectorFromConstructor(): void {
4649
$this->assertSame($reflector, $attribute->reflectorIfSet);
4750
$this->assertSame($reflector, $attribute->reflector);
4851
$this->assertNull($attribute->exception ?? NULL);
52+
}
4953

54+
public function testGetNoReflectorFromConstructor(): void {
55+
$reflector = new \ReflectionClass(TestClassWithAttributes::class);
5056
[$raw_attribute] = get_raw_attributes($reflector, ReflectorAwareConstructorTestAttribute::class);
5157
$this->assertNull($raw_attribute->reflectorIfSet);
5258
$this->assertNull($raw_attribute->reflector ?? NULL);

0 commit comments

Comments
 (0)