initial commit

This commit is contained in:
JonPurvis
2023-09-18 01:00:50 +01:00
parent c08f33638a
commit 6c73a3d90b
8 changed files with 96 additions and 0 deletions

View File

@ -862,4 +862,20 @@ final class Expectation
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
);
}
/**
* Asserts that the given expectation target has a constructor method.
*/
public function toHaveConstructor(): ArchExpectation
{
return $this->toHaveMethod('__construct');
}
/**
* Asserts that the given expectation target has a destructor method.
*/
public function toHaveDestructor(): ArchExpectation
{
return $this->toHaveMethod('__destruct');
}
}