Skip to content
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

bypassFinals: touch() expects parameter 2 to be integer, null given #403

Closed
Gappa opened this issue May 9, 2019 · 0 comments
Closed

bypassFinals: touch() expects parameter 2 to be integer, null given #403

Gappa opened this issue May 9, 2019 · 0 comments

Comments

@Gappa
Copy link

Gappa commented May 9, 2019

Version: 2.2.0

Bug Description

When bypassFinals is enabled this code throws this error:

  • touch($file);
  • touch() expects parameter 2 to be integer, null given

Steps To Reproduce

<?php
declare(strict_types=1);

use Tester\Assert;
use Tester\Environment;
use Tester\TestCase;

require __DIR__ . '/../bootstrap.php';
Environment::bypassFinals();

final class TesterTest extends TestCase
{
	public function testTouch()
	{
		touch('test.txt');
		Assert::same('x', 'x');
	}
}

$test = new TesterTest;
$test->run();

Expected Behavior

Code creates (or updates access time of) the file test.txt.

Possible Solution

Look similar to #395.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant