@@ -26,24 +26,24 @@ public function testMessageAndLineAndBuild(): void
26
26
27
27
public function testMessageAndFileAndBuild (): void
28
28
{
29
- $ builder = RuleErrorBuilder::message ('Foo ' )->file (' Bar.php ' );
29
+ $ builder = RuleErrorBuilder::message ('Foo ' )->file (__FILE__ );
30
30
$ ruleError = $ builder ->build ();
31
31
$ this ->assertSame ('Foo ' , $ ruleError ->getMessage ());
32
32
33
33
$ this ->assertInstanceOf (FileRuleError::class, $ ruleError ); // @phpstan-ignore method.alreadyNarrowedType
34
- $ this ->assertSame (' Bar.php ' , $ ruleError ->getFile ());
34
+ $ this ->assertSame (__FILE__ , $ ruleError ->getFile ());
35
35
}
36
36
37
37
public function testMessageAndLineAndFileAndBuild (): void
38
38
{
39
- $ builder = RuleErrorBuilder::message ('Foo ' )->line (25 )->file (' Bar.php ' );
39
+ $ builder = RuleErrorBuilder::message ('Foo ' )->line (25 )->file (__FILE__ );
40
40
$ ruleError = $ builder ->build ();
41
41
$ this ->assertSame ('Foo ' , $ ruleError ->getMessage ());
42
42
43
43
$ this ->assertInstanceOf (LineRuleError::class, $ ruleError ); // @phpstan-ignore method.alreadyNarrowedType
44
44
$ this ->assertInstanceOf (FileRuleError::class, $ ruleError ); // @phpstan-ignore method.alreadyNarrowedType
45
45
$ this ->assertSame (25 , $ ruleError ->getLine ());
46
- $ this ->assertSame (' Bar.php ' , $ ruleError ->getFile ());
46
+ $ this ->assertSame (__FILE__ , $ ruleError ->getFile ());
47
47
}
48
48
49
49
}
0 commit comments