mirror of
https://github.com/php/web-bugs.git
synced 2026-03-26 00:32:12 +01:00
- Added filter to phpunit config - This enables support for coverage support - Moved unit tests to dedicated directory - Also created constants for the locations of the fixtures and mocks for testing so we do not have to use relative paths in tests - Updated phpunit to 8 - Added type information to tests - Added return type and parameter type declarations for tests - Added strict types to tests - CS fixes in tests - Aligning arrays, consistent string concatenation, removed unused local vars - Added constant for test cache directory - Make the autoloader also properly work on windows - Windows does not care about the directory separator used so just trim both variant from the end.
22 lines
374 B
PHP
22 lines
374 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Tests\Unit\Container;
|
|
|
|
/**
|
|
* Mock service dependency class for testing container.
|
|
*/
|
|
class MockDependency
|
|
{
|
|
private $parameter;
|
|
|
|
public function __construct(string $parameter)
|
|
{
|
|
$this->parameter = $parameter;
|
|
}
|
|
|
|
public function getParameter(): string
|
|
{
|
|
return $this->parameter;
|
|
}
|
|
}
|