Skip to content

leak-demo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/unit/leak/A1000Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace test\unit\common\leak;

use Codeception\Test\Unit;

class A1000Test extends Unit
{
/**
* @dataProvider providerForFoo
*/
public function testFoo(?string $smth): void
{
$this->assertTrue(true);
}

public function providerForFoo()
{
foreach (range(1, 1000) as $i) {
yield ['smth' => 'bar'];
}
}
}
24 changes: 24 additions & 0 deletions tests/unit/leak/A500Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace test\unit\common\leak;

use Codeception\Test\Unit;

class A500Test extends Unit
{

/**
* @dataProvider providerForFoo
*/
public function testFoo(?string $smth): void
{
$this->assertTrue(true);
}

public function providerForFoo()
{
foreach (range(1, 500) as $i) {
yield ['smth' => 'bar'];
}
}
}
27 changes: 27 additions & 0 deletions tests/unit/leak/A500WithForeachTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace test\unit\common\leak;

use Codeception\Test\Unit;

class A500WithForeachTest extends Unit
{

/**
* @dataProvider providerForFoo
*/
public function testFoo(?string $smth): void
{
$this->assertTrue(true);
}

public function providerForFoo()
{
$result = [];
foreach (range(1, 500) as $i) {
$result[] = ['smth' => 'bar'];
}

return $result;
}
}