-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36a2aeb
commit 67ae4d8
Showing
18 changed files
with
1,092 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Framework\Attributes; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] | ||
final readonly class CoversClassesThatExtendClass | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $className; | ||
|
||
/** | ||
* @param class-string $className | ||
*/ | ||
public function __construct(string $className) | ||
{ | ||
$this->className = $className; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function className(): string | ||
{ | ||
return $this->className; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/Framework/Attributes/CoversClassesThatImplementInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Framework\Attributes; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] | ||
final readonly class CoversClassesThatImplementInterface | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $interfaceName; | ||
|
||
/** | ||
* @param class-string $interfaceName | ||
*/ | ||
public function __construct(string $interfaceName) | ||
{ | ||
$this->interfaceName = $interfaceName; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function interfaceName(): string | ||
{ | ||
return $this->interfaceName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Framework\Attributes; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] | ||
final readonly class UsesClassesThatExtendClass | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $className; | ||
|
||
/** | ||
* @param class-string $className | ||
*/ | ||
public function __construct(string $className) | ||
{ | ||
$this->className = $className; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function className(): string | ||
{ | ||
return $this->className; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/Framework/Attributes/UsesClassesThatImplementInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Framework\Attributes; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] | ||
final readonly class UsesClassesThatImplementInterface | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $interfaceName; | ||
|
||
/** | ||
* @param class-string $interfaceName | ||
*/ | ||
public function __construct(string $interfaceName) | ||
{ | ||
$this->interfaceName = $interfaceName; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function interfaceName(): string | ||
{ | ||
return $this->interfaceName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Metadata; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
final readonly class CoversClassesThatExtendClass extends Metadata | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $className; | ||
|
||
/** | ||
* @param 0|1 $level | ||
*/ | ||
protected function __construct(int $level, string $className) | ||
{ | ||
parent::__construct($level); | ||
|
||
$this->className = $className; | ||
} | ||
|
||
public function isCoversClassesThatExtendClass(): true | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function className(): string | ||
{ | ||
return $this->className; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace PHPUnit\Metadata; | ||
|
||
/** | ||
* @immutable | ||
* | ||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||
*/ | ||
final readonly class CoversClassesThatImplementInterface extends Metadata | ||
{ | ||
/** | ||
* @var class-string | ||
*/ | ||
private string $interfaceName; | ||
|
||
/** | ||
* @param 0|1 $level | ||
* @param class-string $interfaceName | ||
*/ | ||
protected function __construct(int $level, string $interfaceName) | ||
{ | ||
parent::__construct($level); | ||
|
||
$this->interfaceName = $interfaceName; | ||
} | ||
|
||
public function isCoversClassesThatImplementInterface(): true | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* @return class-string | ||
*/ | ||
public function interfaceName(): string | ||
{ | ||
return $this->interfaceName; | ||
} | ||
} |
Oops, something went wrong.