Files
pest/tests/PHPUnit/CustomTestCaseInSubFolders/SubFolder2/UsesPerFile.php
2023-02-18 14:39:47 +00:00

26 lines
457 B
PHP

<?php
trait MyCustomTrait
{
public function assertFalseIsFalse()
{
assertFalse(false);
}
}
abstract class MyCustomClass extends PHPUnit\Framework\TestCase
{
public function assertTrueIsTrue()
{
$this->assertTrue(true);
}
}
uses(MyCustomClass::class, MyCustomTrait::class);
test('custom traits can be used', function () {
$this->assertTrueIsTrue();
});
test('trait applied in this file')->assertTrueIsTrue();