diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..40baf33 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + branches: [master] + pull_request_target: + branches: [master] + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + extensions: mbstring, pdo_mysql, json + coverage: none + - name: Install dependencies + run: composer install --no-progress --prefer-dist + - name: Run tests + run: vendor/bin/codecept run diff --git a/MILESTONES.yaml b/MILESTONES.yaml index 99f368d..d775ba2 100644 --- a/MILESTONES.yaml +++ b/MILESTONES.yaml @@ -1,7 +1,7 @@ milestones: # Milestone 0: Project Foundation & Setup milestone_0_project_foundation: - status: TODO + status: COMPLETE description: >- Set up the project structure, Composer dependencies, autoloading, and basic bootstrap files. This establishes the base for all subsequent @@ -32,7 +32,7 @@ milestones: # Milestone 1: Configuration & Environment Management milestone_1_configuration: - status: TODO + status: COMPLETE description: >- Implement environment configuration loading, Infisical integration, and .env handling. This provides secure runtime secrets and diff --git a/_bootstrap.php b/_bootstrap.php new file mode 100644 index 0000000..d1c27a7 --- /dev/null +++ b/_bootstrap.php @@ -0,0 +1,2 @@ +safeLoad(); + +$mergedEnv = $_ENV + $_SERVER; + +use League\Container\Container; +use SiteWeaver\Core\Config; +$container = new Container(); +$container->add('config', function () use ($mergedEnv) { + return new Config($mergedEnv); +}); + +return $container; diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..4bb52cc --- /dev/null +++ b/public/index.php @@ -0,0 +1,7 @@ + */ + private array $values = []; + + public function __construct(array $env = null) + { + // Use provided env array or fallback to $_ENV + $this->values = $env ?? $_ENV; + + // If Infisical integration variables are present, attempt to fetch secrets + if ($this->hasInfisicalConfig()) { + try { + $sdk = new InfisicalSDK($this->get('INFISICAL_URL')); + + // Optional authentication using client credentials + $clientId = $this->get('INFISICAL_CLIENT_ID'); + $clientSecret = $this->get('INFISICAL_CLIENT_SECRET'); + if ($clientId !== null && $clientSecret !== null) { + /** @var UniversalAuthService $auth */ + $auth = $sdk->auth()->universalAuth(); + /** @var MachineIdentityCredential $credential */ + $credential = $auth->login($clientId, $clientSecret); + // The SDK will internally set the auth token via callback + } + + // Fetch secrets and merge into values if not already defined + foreach ($sdk->secrets()->list() as $secret) { + $key = $secret->secretKey ?? null; + $value = $secret->secretValue ?? null; + if ($key !== null && $value !== null && !array_key_exists($key, $this->values)) { + $this->values[$key] = $value; + } + } + } catch (\Throwable $e) { + // If Infisical integration fails, rethrow as runtime exception + throw new \RuntimeException('Failed to fetch secrets from Infisical: ' . $e->getMessage(), 0, $e); + } + } + } + + /** + * Check if required Infisical config variables are present. + */ + private function hasInfisicalConfig(): bool + { + return !empty($this->values['INFISICAL_URL']) && + !empty($this->values['INFISICAL_ENV']) && + !empty($this->values['INFISICAL_PROJECT_ID']); + } + + public function get(string $key, mixed $default = null): mixed + { + return $this->values[$key] ?? $default; + } + + /** + * Return all configuration values. + */ + public function all(): array + { + return $this->values; + } +} +?> diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php new file mode 100644 index 0000000..26a796a --- /dev/null +++ b/tests/_bootstrap.php @@ -0,0 +1,2 @@ +expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * @see \Codeception\Module\Asserts::expectThrowable() + */ + public function expectThrowable(\Throwable|string $throwable, callable $callback): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() + */ + public function assertFileNotExists(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() + */ + public function assertGreaterOrEquals($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() + */ + public function assertIsEmpty(mixed $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() + */ + public function assertLessOrEquals(mixed $expected, mixed $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() + */ + public function assertNotRegExp(string $pattern, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertRegExp() + */ + public function assertRegExp(string $pattern, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() + */ + public function assertThatItsNot(mixed $value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array has a specified key. + * @param array|ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() + */ + public function assertArrayHasKey(string|int $key, \ArrayAccess|array $array, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array does not have a specified key. + * @param array|ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey(string|int $key, \ArrayAccess|array $array, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified attribute. + * @param class-string $className + * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() + */ + public function assertClassHasAttribute(string $attributeName, string $className, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified static attribute. + * @param class-string $className + * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() + */ + public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified attribute. + * @param class-string $className + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() + */ + public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified static attribute. + * @param class-string $className + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() + */ + public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains a needle. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContains() + */ + public function assertContains(mixed $needle, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() + */ + public function assertContainsEquals(mixed $needle, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() + */ + public function assertNotContainsEquals(mixed $needle, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyArray() + */ + public function assertContainsNotOnlyArray(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyBool() + */ + public function assertContainsNotOnlyBool(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyCallable() + */ + public function assertContainsNotOnlyCallable(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyFloat() + */ + public function assertContainsNotOnlyFloat(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param class-string $className + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyInstancesOf() + */ + public function assertContainsNotOnlyInstancesOf(string $className, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyInt() + */ + public function assertContainsNotOnlyInt(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyIterable() + */ + public function assertContainsNotOnlyIterable(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyNull() + */ + public function assertContainsNotOnlyNull(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyNumeric() + */ + public function assertContainsNotOnlyNumeric(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyObject() + */ + public function assertContainsNotOnlyObject(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyResource() + */ + public function assertContainsNotOnlyResource(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyClosedResource() + */ + public function assertContainsNotOnlyClosedResource(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyScalar() + */ + public function assertContainsNotOnlyScalar(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsNotOnlyString() + */ + public function assertContainsNotOnlyString(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsNotOnlyString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only values of a given type. + * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource'|'resource (closed)'|'scalar'|'string'|class-string $type + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() + */ + public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only instances of a given class name. + * @param class-string $className + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() + */ + public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyArray() + */ + public function assertContainsOnlyArray(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyBool() + */ + public function assertContainsOnlyBool(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyCallable() + */ + public function assertContainsOnlyCallable(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyFloat() + */ + public function assertContainsOnlyFloat(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInt() + */ + public function assertContainsOnlyInt(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyIterable() + */ + public function assertContainsOnlyIterable(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyNull() + */ + public function assertContainsOnlyNull(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyNumeric() + */ + public function assertContainsOnlyNumeric(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyObject() + */ + public function assertContainsOnlyObject(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyResource() + */ + public function assertContainsOnlyResource(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyClosedResource() + */ + public function assertContainsOnlyClosedResource(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyScalar() + */ + public function assertContainsOnlyScalar(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyString() + */ + public function assertContainsOnlyString(iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertCount() + */ + public function assertCount(int $expectedCount, \Countable|\Traversable|array $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory does not exist. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() + */ + public function assertDirectoryDoesNotExist(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() + */ + public function assertDirectoryExists(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() + */ + public function assertDirectoryIsNotReadable(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() + */ + public function assertDirectoryIsNotWritable(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() + */ + public function assertDirectoryIsReadable(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() + */ + public function assertDirectoryIsWritable(string $directory, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() + */ + public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param mixed $actual + * + * @phpstan-assert empty $actual + * @see \Codeception\Module\AbstractAsserts::assertEmpty() + */ + public function assertEmpty($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEquals() + */ + public function assertEquals($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is false. + * + * @param mixed $condition + * + * @phpstan-assert false $condition + * @see \Codeception\Module\AbstractAsserts::assertFalse() + */ + public function assertFalse($condition, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() + */ + public function assertFileDoesNotExist(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileEquals() + */ + public function assertFileEquals(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() + */ + public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() + */ + public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists. + * @see \Codeception\Module\AbstractAsserts::assertFileExists() + */ + public function assertFileExists(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() + */ + public function assertFileIsNotReadable(string $file, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() + */ + public function assertFileIsNotWritable(string $file, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() + */ + public function assertFileIsReadable(string $file, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() + */ + public function assertFileIsWritable(string $file, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() + */ + public function assertFileNotEquals(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() + */ + public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() + */ + public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is finite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertFinite() + */ + public function assertFinite($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is infinite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertInfinite() + */ + public function assertInfinite($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() + */ + public function assertInstanceOf(string $expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type array. + * + * @param mixed $actual + * @phpstan-assert array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsArray() + */ + public function assertIsArray($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type bool. + * + * @param mixed $actual + * + * @phpstan-assert bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsBool() + */ + public function assertIsBool($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type callable. + * + * @param mixed $actual + * + * @phpstan-assert callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsCallable() + */ + public function assertIsCallable($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource and is closed. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() + */ + public function assertIsClosedResource($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type float. + * + * @param mixed $actual + * + * @phpstan-assert float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsFloat() + */ + public function assertIsFloat($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type int. + * + * @param mixed $actual + * + * @phpstan-assert int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsInt() + */ + public function assertIsInt($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsIterable() + */ + public function assertIsIterable($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type array. + * + * @param mixed $actual + * + * @phpstan-assert !array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type bool. + * + * @param mixed $actual + * + * @phpstan-assert !bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type callable. + * + * @param mixed $actual + * + * @phpstan-assert !callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() + */ + public function assertIsNotClosedResource($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type float. + * + * @param mixed $actual + * + * @phpstan-assert !float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type int. + * + * @param mixed $actual + * + * @phpstan-assert !int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert !iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() + */ + public function assertIsNotIterable($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert !numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type object. + * + * @param mixed $actual + * + * @phpstan-assert !object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() + */ + public function assertIsNotReadable(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type scalar. + * + * @param mixed $actual + * + * @psalm-assert !scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type string. + * + * @param mixed $actual + * + * @phpstan-assert !string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotString() + */ + public function assertIsNotString($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() + */ + public function assertIsNotWritable(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type object. + * + * @param mixed $actual + * + * @phpstan-assert object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsObject() + */ + public function assertIsObject($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir is readable. + * @see \Codeception\Module\AbstractAsserts::assertIsReadable() + */ + public function assertIsReadable(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsResource() + */ + public function assertIsResource($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type scalar. + * + * @param mixed $actual + * + * @phpstan-assert scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsScalar() + */ + public function assertIsScalar($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type string. + * + * @param mixed $actual + * + * @phpstan-assert string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsString() + */ + public function assertIsString($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertIsWritable() + */ + public function assertIsWritable(string $filename, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string is a valid JSON string. + * @see \Codeception\Module\AbstractAsserts::assertJson() + */ + public function assertJson(string $actualJson, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() + */ + public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() + */ + public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() + */ + public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() + */ + public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() + */ + public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() + */ + public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() + */ + public function assertMatchesRegularExpression(string $pattern, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is nan. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNan() + */ + public function assertNan($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain a needle. + * + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotContains() + */ + public function assertNotContains(mixed $needle, iterable $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain only values of a given type. + * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource'|'resource (closed)'|'scalar'|'string'|class-string $type + * @param iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() + */ + public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotCount() + */ + public function assertNotCount(int $expectedCount, \Countable|\Traversable|array $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not empty. + * + * @param mixed $actual + * + * @phpstan-assert !empty $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not false. + * + * @param mixed $condition + * + * @phpstan-assert !false $condition + * @see \Codeception\Module\AbstractAsserts::assertNotFalse() + */ + public function assertNotFalse($condition, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert !ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf(string $expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not null. + * + * @param mixed $actual + * + * @phpstan-assert !null $actual + * @see \Codeception\Module\AbstractAsserts::assertNotNull() + */ + public function assertNotNull($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables do not have the same type and value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() + */ + public function assertNotSameSize(\Countable|\Traversable|array $expected, \Countable|\Traversable|array $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not true. + * + * @param mixed $condition + * + * @phpstan-assert !true $condition + * @see \Codeception\Module\AbstractAsserts::assertNotTrue() + */ + public function assertNotTrue($condition, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is null. + * + * @param mixed $actual + * + * @phpstan-assert null $actual + * @see \Codeception\Module\AbstractAsserts::assertNull() + */ + public function assertNull($actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object has a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() + */ + public function assertObjectHasAttribute(string $attributeName, object $object, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object does not have a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() + */ + public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables have the same type and value. + * Used on objects, it asserts that two variables reference + * the same object. + * + * @template ExpectedType + * + * @param ExpectedType $expected + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertSame() + */ + public function assertSame(mixed $expected, mixed $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertSameSize() + */ + public function assertSameSize(\Countable|\Traversable|array $expected, \Countable|\Traversable|array $actual, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() + */ + public function assertStringContainsString(string $needle, string $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends not with a given suffix. + * @param non-empty-string $suffix + * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith(string $suffix, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends with a given suffix. + * @param non-empty-string $suffix + * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() + */ + public function assertStringEndsWith(string $suffix, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() + */ + public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() + */ + public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() + */ + public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() + */ + public function assertStringMatchesFormat(string $format, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format file. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() + */ + public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString(string $needle, string $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() + */ + public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() + */ + public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() + */ + public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() + */ + public function assertStringNotMatchesFormat(string $format, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() + */ + public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts not with a given prefix. + * @param non-empty-string $prefix + * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith(string $prefix, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts with a given prefix. + * @param non-empty-string $prefix + * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() + */ + public function assertStringStartsWith(string $prefix, string $string, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param mixed $value + * @see \Codeception\Module\AbstractAsserts::assertThat() + */ + public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is true. + * + * @param mixed $condition + * + * @phpstan-assert true $condition + * @see \Codeception\Module\AbstractAsserts::assertTrue() + */ + public function assertTrue($condition, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() + */ + public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() + */ + public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() + */ + public function assertXmlStringEqualsXmlFile(string $expectedFile, \DOMDocument|string $actualXml, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() + */ + public function assertXmlStringEqualsXmlString(\DOMDocument|string $expectedXml, \DOMDocument|string $actualXml, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() + */ + public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() + */ + public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ""): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails a test with the given message. + * @see \Codeception\Module\AbstractAsserts::fail() + */ + public function fail(string $message = ""): never { + $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as incomplete. + * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() + */ + public function markTestIncomplete(string $message = ""): never { + $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as skipped. + * @see \Codeception\Module\AbstractAsserts::markTestSkipped() + */ + public function markTestSkipped(string $message = ""): never { + $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); + } +} diff --git a/tests/unit/Core/ConfigTest.php b/tests/unit/Core/ConfigTest.php new file mode 100644 index 0000000..e453f64 --- /dev/null +++ b/tests/unit/Core/ConfigTest.php @@ -0,0 +1,40 @@ + 'testing', + 'DB_HOST' => 'localhost', + 'DEBUG' => true, + ]; + + $config = new Config($env); + + $this->assertSame('testing', $config->get('APP_ENV')); + $this->assertSame('localhost', $config->get('DB_HOST')); + $this->assertTrue($config->get('DEBUG')); + + // unknown key returns null + $this->assertNull($config->get('NON_EXISTENT_KEY')); + } + + public function testAllReturnsMergedArray(): void + { + $env = [ + 'FOO' => 'bar', + 'BAZ' => 123, + ]; + + $config = new Config($env); + + $this->assertSame($env, $config->all()); + } +} diff --git a/tests/unit/UnitTester.php b/tests/unit/UnitTester.php new file mode 100644 index 0000000..717873f --- /dev/null +++ b/tests/unit/UnitTester.php @@ -0,0 +1,7 @@ +