Skip to content

Commit 189cb5c

Browse files
committed
tests: used Assert::matchFile()
1 parent 78b0b9b commit 189cb5c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/PhpGenerator/ClassType.from.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ $res[] = ClassType::from('Abc\Interface2');
7171
$res[] = ClassType::from('Abc\Class1');
7272
$res[] = ClassType::from(new ReflectionClass('Abc\Class2'));
7373

74-
Assert::match(file_get_contents(__DIR__ . '/ClassType.from.expect'), implode("\n", $res));
74+
Assert::matchFile(__DIR__ . '/ClassType.from.expect', implode("\n", $res));

tests/PhpGenerator/ClassType.from.trait.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ $res[] = ClassType::from(new ReflectionClass('Trait2'));
4343
$res[] = ClassType::from(new ReflectionClass('Class1'));
4444
$res[] = ClassType::from(new ReflectionClass('Class2'));
4545

46-
Assert::match(file_get_contents(__DIR__ . '/ClassType.from.trait.expect'), implode("\n", $res));
46+
Assert::matchFile(__DIR__ . '/ClassType.from.trait.expect', implode("\n", $res));

tests/PhpGenerator/ClassType.interface.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ $interface
2222

2323
$interface->addMethod('getForm');
2424

25-
Assert::match(file_get_contents(__DIR__ . '/ClassType.interface.expect'), (string) $interface);
25+
Assert::matchFile(__DIR__ . '/ClassType.interface.expect', (string) $interface);

tests/PhpGenerator/ClassType.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ $method->addParameter('res', NULL)
6262
->setReference(TRUE)
6363
->setTypeHint('array');
6464

65-
Assert::match(file_get_contents(__DIR__ . '/ClassType.expect'), (string) $class);
65+
Assert::matchFile(__DIR__ . '/ClassType.expect', (string) $class);

tests/PhpGenerator/Method.closure.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ $function->addUse('this');
2424
$function->addUse('vars')
2525
->setReference(TRUE);
2626

27-
Assert::match(file_get_contents(__DIR__ . '/Method.closure.expect'), (string) $function);
27+
Assert::matchFile(__DIR__ . '/Method.closure.expect', (string) $function);

0 commit comments

Comments
 (0)