mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
Add test for inheritance with depends
This commit is contained in:
22
tests/Features/DependsInheritance.php
Normal file
22
tests/Features/DependsInheritance.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class InheritanceTest extends TestCase
|
||||||
|
{
|
||||||
|
public function foo()
|
||||||
|
{
|
||||||
|
return 'bar';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uses(InheritanceTest::class);
|
||||||
|
|
||||||
|
it('is a test', function () {
|
||||||
|
expect(true)->toBeTrue();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses correct parent class', function () {
|
||||||
|
expect(get_parent_class($this))->toEqual(InheritanceTest::class);
|
||||||
|
expect($this->foo())->toEqual('bar');
|
||||||
|
})->depends('it is a test');
|
||||||
Reference in New Issue
Block a user