mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
26 lines
472 B
PHP
26 lines
472 B
PHP
<?php
|
|
|
|
trait MyCustomTrait
|
|
{
|
|
public function assertFalseIsFalse()
|
|
{
|
|
assertFalse(false);
|
|
}
|
|
}
|
|
|
|
abstract class MyCustomClass extends PHPUnit\Framework\TestCase
|
|
{
|
|
public function assertTrueIsTrue()
|
|
{
|
|
$this->assertTrue(true);
|
|
}
|
|
}
|
|
|
|
pest()->extend(MyCustomClass::class)->use(MyCustomTrait::class);
|
|
|
|
test('custom traits can be used', function () {
|
|
$this->assertTrueIsTrue();
|
|
});
|
|
|
|
test('trait applied in this file')->assertTrueIsTrue();
|