Skip to content

Commit

Permalink
#2273 - Fix Generator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Oct 3, 2021
1 parent f60d8f7 commit e0b6106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Library/Stubs/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function buildClass(ClassDefinition $class, string $indent, string $ba
$constants[] = $this->buildConstant($constant, $indent).PHP_EOL;
}

$source .= implode(PHP_EOL, $constants);
$source .= implode(PHP_EOL, $constants).PHP_EOL;
unset($constants);

/**
Expand Down
6 changes: 2 additions & 4 deletions tests/Zephir/Stubs/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,13 @@ final class StubsBuildClass extends BaseTestClass implements \Iterator, EventsMa
*/
static public \$defaultPathDelimiter = null;
/**
* @param string \$key
* @param int \$priority
*/
public static function init(string \$key, int \$priority = 1)
{
}
}
DOC;
Expand Down Expand Up @@ -284,7 +282,7 @@ public function testShouldBuildProperty(array $visibility, string $type, $value,
]
);

$this->assertSame(PHP_EOL.$expected, $actual);
$this->assertSame($expected, $actual);
}

public function constantProvider(): array
Expand Down Expand Up @@ -380,7 +378,7 @@ public function testShouldBuildConstant(string $type, $value, string $expected):
]
);

$this->assertSame(PHP_EOL.$expected, $actual);
$this->assertSame($expected, $actual);
}

public function testShouldBuildMethod(): void
Expand Down

0 comments on commit e0b6106

Please sign in to comment.