mirror of
https://github.com/flarum/framework.git
synced 2025-02-20 22:00:24 +08:00
Merge pull request #17 from mikedugan/master
add codeception, update gitignore
This commit is contained in:
commit
0d6b4a2732
4
framework/core/.gitignore
vendored
4
framework/core/.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
/vendor
|
||||
composer.phar
|
||||
composer.lock
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
public/*
|
||||
public/*
|
||||
tests/_output/*
|
||||
|
17
framework/core/codeception.yml
Normal file
17
framework/core/codeception.yml
Normal file
@ -0,0 +1,17 @@
|
||||
actor: Tester
|
||||
paths:
|
||||
tests: tests
|
||||
log: tests/_output
|
||||
data: tests/_data
|
||||
helpers: tests/_support
|
||||
settings:
|
||||
bootstrap: _bootstrap.php
|
||||
colors: true
|
||||
memory_limit: 1024M
|
||||
modules:
|
||||
config:
|
||||
Db:
|
||||
dsn: ''
|
||||
user: ''
|
||||
password: ''
|
||||
dump: tests/_data/dump.sql
|
@ -15,16 +15,17 @@
|
||||
"tobscure/permissible": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "1.4.0"
|
||||
"fzaninotto/faker": "1.4.0",
|
||||
"codeception/codeception": "~2.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/migrations"
|
||||
],
|
||||
"psr-4": {
|
||||
"Flarum\\Core": "src/Flarum/Core",
|
||||
"Flarum\\Api": "src/Flarum/Api",
|
||||
"Flarum\\Web": "src/Flarum/Web"
|
||||
"Flarum\\Core\\": "src/Flarum/Core",
|
||||
"Flarum\\Api\\": "src/Flarum/Api",
|
||||
"Flarum\\Web\\": "src/Flarum/Web"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
1962
framework/core/composer.lock
generated
Normal file
1962
framework/core/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Package Test Suite">
|
||||
<directory suffix=".php">./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
2
framework/core/tests/_bootstrap.php
Normal file
2
framework/core/tests/_bootstrap.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// This is global bootstrap for autoloading
|
1
framework/core/tests/_data/dump.sql
Normal file
1
framework/core/tests/_data/dump.sql
Normal file
@ -0,0 +1 @@
|
||||
/* Replace this file with actual dump of your database */
|
10
framework/core/tests/_support/AcceptanceHelper.php
Normal file
10
framework/core/tests/_support/AcceptanceHelper.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class AcceptanceHelper extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
10
framework/core/tests/_support/FunctionalHelper.php
Normal file
10
framework/core/tests/_support/FunctionalHelper.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class FunctionalHelper extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
10
framework/core/tests/_support/UnitHelper.php
Normal file
10
framework/core/tests/_support/UnitHelper.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class UnitHelper extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
14
framework/core/tests/acceptance.suite.yml
Normal file
14
framework/core/tests/acceptance.suite.yml
Normal file
@ -0,0 +1,14 @@
|
||||
# Codeception Test Suite Configuration
|
||||
|
||||
# suite for acceptance tests.
|
||||
# perform tests in browser using the WebDriver or PhpBrowser.
|
||||
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
|
||||
|
||||
class_name: AcceptanceTester
|
||||
modules:
|
||||
enabled:
|
||||
- PhpBrowser
|
||||
- AcceptanceHelper
|
||||
config:
|
||||
PhpBrowser:
|
||||
url: 'http://localhost/myapp/'
|
1587
framework/core/tests/acceptance/AcceptanceTester.php
Normal file
1587
framework/core/tests/acceptance/AcceptanceTester.php
Normal file
File diff suppressed because it is too large
Load Diff
2
framework/core/tests/acceptance/_bootstrap.php
Normal file
2
framework/core/tests/acceptance/_bootstrap.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Here you can initialize variables that will be available to your tests
|
9
framework/core/tests/functional.suite.yml
Normal file
9
framework/core/tests/functional.suite.yml
Normal file
@ -0,0 +1,9 @@
|
||||
# Codeception Test Suite Configuration
|
||||
|
||||
# suite for functional (integration) tests.
|
||||
# emulate web requests and make application process them.
|
||||
# Include one of framework modules (Symfony2, Yii2, Laravel4) to use it.
|
||||
|
||||
class_name: FunctionalTester
|
||||
modules:
|
||||
enabled: [Filesystem, FunctionalHelper]
|
360
framework/core/tests/functional/FunctionalTester.php
Normal file
360
framework/core/tests/functional/FunctionalTester.php
Normal file
@ -0,0 +1,360 @@
|
||||
<?php //[STAMP] 92e3a5639db903a93dbc0ada7934f9ca
|
||||
|
||||
// This class was automatically generated by build task
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
|
||||
use Codeception\Module\Filesystem;
|
||||
use Codeception\Module\FunctionalHelper;
|
||||
|
||||
/**
|
||||
* Inherited Methods
|
||||
* @method void wantToTest($text)
|
||||
* @method void wantTo($text)
|
||||
* @method void execute($callable)
|
||||
* @method void expectTo($prediction)
|
||||
* @method void expect($prediction)
|
||||
* @method void amGoingTo($argumentation)
|
||||
* @method void am($role)
|
||||
* @method void lookForwardTo($achieveValue)
|
||||
* @method void comment($description)
|
||||
* @method void haveFriend($name, $actorClass = null)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class FunctionalTester extends \Codeception\Actor
|
||||
{
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Enters a directory In local filesystem.
|
||||
* Project root directory is used by default
|
||||
*
|
||||
* @param $path
|
||||
* @see \Codeception\Module\Filesystem::amInPath()
|
||||
*/
|
||||
public function amInPath($path) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Opens a file and stores it's content.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('composer.json');
|
||||
* $I->seeInThisFile('codeception/codeception');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $filename
|
||||
* @see \Codeception\Module\Filesystem::openFile()
|
||||
*/
|
||||
public function openFile($filename) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Deletes a file
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->deleteFile('composer.lock');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $filename
|
||||
* @see \Codeception\Module\Filesystem::deleteFile()
|
||||
*/
|
||||
public function deleteFile($filename) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Deletes directory with all subdirectories
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->deleteDir('vendor');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $dirname
|
||||
* @see \Codeception\Module\Filesystem::deleteDir()
|
||||
*/
|
||||
public function deleteDir($dirname) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Copies directory with all contents
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->copyDir('vendor','old_vendor');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $src
|
||||
* @param $dst
|
||||
* @see \Codeception\Module\Filesystem::copyDir()
|
||||
*/
|
||||
public function copyDir($src, $dst) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks If opened file has `text` in it.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('composer.json');
|
||||
* $I->seeInThisFile('codeception/codeception');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* Conditional Assertion: Test won't be stopped on fail
|
||||
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
||||
*/
|
||||
public function canSeeInThisFile($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
|
||||
}
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks If opened file has `text` in it.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('composer.json');
|
||||
* $I->seeInThisFile('codeception/codeception');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
||||
*/
|
||||
public function seeInThisFile($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks the strict matching of file contents.
|
||||
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
||||
* Better to use with HEREDOC strings.
|
||||
* Matching is done after removing "\r" chars from file content.
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('process.pid');
|
||||
* $I->seeFileContentsEqual('3192');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* Conditional Assertion: Test won't be stopped on fail
|
||||
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
||||
*/
|
||||
public function canSeeFileContentsEqual($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
|
||||
}
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks the strict matching of file contents.
|
||||
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
||||
* Better to use with HEREDOC strings.
|
||||
* Matching is done after removing "\r" chars from file content.
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('process.pid');
|
||||
* $I->seeFileContentsEqual('3192');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
||||
*/
|
||||
public function seeFileContentsEqual($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks If opened file doesn't contain `text` in it
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('composer.json');
|
||||
* $I->dontSeeInThisFile('codeception/codeception');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* Conditional Assertion: Test won't be stopped on fail
|
||||
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
||||
*/
|
||||
public function cantSeeInThisFile($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
|
||||
}
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks If opened file doesn't contain `text` in it
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->openFile('composer.json');
|
||||
* $I->dontSeeInThisFile('codeception/codeception');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $text
|
||||
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
||||
*/
|
||||
public function dontSeeInThisFile($text) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Deletes a file
|
||||
* @see \Codeception\Module\Filesystem::deleteThisFile()
|
||||
*/
|
||||
public function deleteThisFile() {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks if file exists in path.
|
||||
* Opens a file when it's exists
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->seeFileFound('UserModel.php','app/models');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $filename
|
||||
* @param string $path
|
||||
* Conditional Assertion: Test won't be stopped on fail
|
||||
* @see \Codeception\Module\Filesystem::seeFileFound()
|
||||
*/
|
||||
public function canSeeFileFound($filename, $path = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
|
||||
}
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks if file exists in path.
|
||||
* Opens a file when it's exists
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->seeFileFound('UserModel.php','app/models');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $filename
|
||||
* @param string $path
|
||||
* @see \Codeception\Module\Filesystem::seeFileFound()
|
||||
*/
|
||||
public function seeFileFound($filename, $path = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks if file does not exists in path
|
||||
*
|
||||
* @param $filename
|
||||
* @param string $path
|
||||
* Conditional Assertion: Test won't be stopped on fail
|
||||
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
||||
*/
|
||||
public function cantSeeFileFound($filename, $path = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
|
||||
}
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks if file does not exists in path
|
||||
*
|
||||
* @param $filename
|
||||
* @param string $path
|
||||
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
||||
*/
|
||||
public function dontSeeFileFound($filename, $path = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Erases directory contents
|
||||
*
|
||||
* ``` php
|
||||
* <?php
|
||||
* $I->cleanDir('logs');
|
||||
* ?>
|
||||
* ```
|
||||
*
|
||||
* @param $dirname
|
||||
* @see \Codeception\Module\Filesystem::cleanDir()
|
||||
*/
|
||||
public function cleanDir($dirname) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Saves contents to file
|
||||
*
|
||||
* @param $filename
|
||||
* @param $contents
|
||||
* @see \Codeception\Module\Filesystem::writeToFile()
|
||||
*/
|
||||
public function writeToFile($filename, $contents) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
|
||||
}
|
||||
}
|
2
framework/core/tests/functional/_bootstrap.php
Normal file
2
framework/core/tests/functional/_bootstrap.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Here you can initialize variables that will be available to your tests
|
6
framework/core/tests/unit.suite.yml
Normal file
6
framework/core/tests/unit.suite.yml
Normal file
@ -0,0 +1,6 @@
|
||||
# Codeception Test Suite Configuration
|
||||
|
||||
# suite for unit (internal) tests.
|
||||
class_name: UnitTester
|
||||
modules:
|
||||
enabled: [Asserts, UnitHelper]
|
268
framework/core/tests/unit/UnitTester.php
Normal file
268
framework/core/tests/unit/UnitTester.php
Normal file
@ -0,0 +1,268 @@
|
||||
<?php //[STAMP] 4f61f396dfd2c13f154c1be4d8245c48
|
||||
|
||||
// This class was automatically generated by build task
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
|
||||
use Codeception\Module\Asserts;
|
||||
use Codeception\Module\UnitHelper;
|
||||
|
||||
/**
|
||||
* Inherited Methods
|
||||
* @method void wantToTest($text)
|
||||
* @method void wantTo($text)
|
||||
* @method void execute($callable)
|
||||
* @method void expectTo($prediction)
|
||||
* @method void expect($prediction)
|
||||
* @method void amGoingTo($argumentation)
|
||||
* @method void am($role)
|
||||
* @method void lookForwardTo($achieveValue)
|
||||
* @method void comment($description)
|
||||
* @method void haveFriend($name, $actorClass = null)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class UnitTester extends \Codeception\Actor
|
||||
{
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that two variables are equal.
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @return mixed
|
||||
* @see \Codeception\Module\Asserts::assertEquals()
|
||||
*/
|
||||
public function assertEquals($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that two variables are not equal
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertNotEquals()
|
||||
*/
|
||||
public function assertNotEquals($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that expected is greater than actual
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertGreaterThan()
|
||||
*/
|
||||
public function assertGreaterThan($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* @deprecated
|
||||
* @see \Codeception\Module\Asserts::assertGreaterThen()
|
||||
*/
|
||||
public function assertGreaterThen($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that expected is greater or equal than actual
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
|
||||
*/
|
||||
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* @deprecated
|
||||
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
|
||||
*/
|
||||
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that expected is less than actual
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertLessThan()
|
||||
*/
|
||||
public function assertLessThan($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that expected is less or equal than actual
|
||||
*
|
||||
* @param $expected
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
|
||||
*/
|
||||
public function assertLessThanOrEqual($expected, $actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that haystack contains needle
|
||||
*
|
||||
* @param $needle
|
||||
* @param $haystack
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertContains()
|
||||
*/
|
||||
public function assertContains($needle, $haystack, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that haystack doesn't contain needle.
|
||||
*
|
||||
* @param $needle
|
||||
* @param $haystack
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertNotContains()
|
||||
*/
|
||||
public function assertNotContains($needle, $haystack, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that variable is empty.
|
||||
*
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertEmpty()
|
||||
*/
|
||||
public function assertEmpty($actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that variable is not empty.
|
||||
*
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertNotEmpty()
|
||||
*/
|
||||
public function assertNotEmpty($actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that variable is NULL
|
||||
*
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertNull()
|
||||
*/
|
||||
public function assertNull($actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that variable is not NULL
|
||||
*
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertNotNull()
|
||||
*/
|
||||
public function assertNotNull($actual, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that condition is positive.
|
||||
*
|
||||
* @param $condition
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertTrue()
|
||||
*/
|
||||
public function assertTrue($condition, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Checks that condition is negative.
|
||||
*
|
||||
* @param $condition
|
||||
* @param string $message
|
||||
* @see \Codeception\Module\Asserts::assertFalse()
|
||||
*/
|
||||
public function assertFalse($condition, $message = null) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [!] Method is generated. Documentation taken from corresponding module.
|
||||
*
|
||||
* Fails the test with message.
|
||||
*
|
||||
* @param $message
|
||||
* @see \Codeception\Module\Asserts::fail()
|
||||
*/
|
||||
public function fail($message) {
|
||||
return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));
|
||||
}
|
||||
}
|
2
framework/core/tests/unit/_bootstrap.php
Normal file
2
framework/core/tests/unit/_bootstrap.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Here you can initialize variables that will be available to your tests
|
Loading…
x
Reference in New Issue
Block a user