Skip to content

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

@Gappa

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.

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