Skip to content

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

Description

@Gappa

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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions