Skip to content

Commit

Permalink
Merge pull request #21 from goetas/rename-test
Browse files Browse the repository at this point in the history
Rename emptyTest into testMemoryBaselineWithEmptyTestBody
  • Loading branch information
Ocramius authored Apr 17, 2019
2 parents 1b50349 + 3474965 commit ec6aa10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/EmptyBaselineMemoryUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
final class EmptyBaselineMemoryUsageTest extends TestCase
{
public const TEST_METHOD = 'emptyTest';
public const TEST_METHOD = 'testMemoryBaselineWithEmptyTestBody';
private const ASSERTION_COUNT = 1;

/**
Expand All @@ -23,7 +23,7 @@ final class EmptyBaselineMemoryUsageTest extends TestCase
* Tests that deviate from this baseline pre/post memory usage are most
* likely leaking.
*/
public function emptyTest() : void
public function testMemoryBaselineWithEmptyTestBody() : void
{
$this->addToAssertionCount(self::ASSERTION_COUNT);
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/CollectTestExecutionMemoryFootprintsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function testWillRegisterBaselineTestInTestSuite() : void
$testSuite
->expects(self::once())
->method('addTest')
->with(self::equalTo(new Baseline('emptyTest')));
->with(self::equalTo(new Baseline('testMemoryBaselineWithEmptyTestBody')));

(new CollectTestExecutionMemoryFootprints())->startTestSuite($testSuite);
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/EmptyBaselineMemoryUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testDoesNotProduceMemoryLeaks() : void
// intentional immediate value override - we're offsetting memory usage here, on purpose
$memoryUsage = memory_get_usage();

$test->emptyTest();
$test->testMemoryBaselineWithEmptyTestBody();

self::assertSame($memoryUsage, memory_get_usage());
self::assertSame(1, $test->getNumAssertions());
Expand Down

0 comments on commit ec6aa10

Please sign in to comment.