init
This commit is contained in:
35
vendor/codeception/base/tests/support/AngularGuy.php
vendored
Normal file
35
vendor/codeception/base/tests/support/AngularGuy.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
use Codeception\Util\JsonArray;
|
||||
use Codeception\Util\Shared\Asserts;
|
||||
|
||||
/**
|
||||
* 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 \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class AngularGuy extends \Codeception\Actor
|
||||
{
|
||||
use Asserts;
|
||||
use _generated\AngularGuyActions;
|
||||
|
||||
public function seeInFormResult($expected)
|
||||
{
|
||||
$jsonArray = new JsonArray($this->grabTextFrom(['id' => 'data']));
|
||||
$this->assertTrue($jsonArray->containsArray($expected), var_export($jsonArray->toArray(), true));
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
$this->click('Submit');
|
||||
}
|
||||
}
|
||||
30
vendor/codeception/base/tests/support/CliGuy.php
vendored
Normal file
30
vendor/codeception/base/tests/support/CliGuy.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* 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 CliGuy extends \Codeception\Actor
|
||||
{
|
||||
use _generated\CliGuyActions;
|
||||
|
||||
/**
|
||||
* @param $file
|
||||
*/
|
||||
public function seeInSupportDir($file)
|
||||
{
|
||||
$this->seeFileFound($file, 'tests/support');
|
||||
}
|
||||
}
|
||||
41
vendor/codeception/base/tests/support/CliHelper.php
vendored
Normal file
41
vendor/codeception/base/tests/support/CliHelper.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom functions for CliGuy
|
||||
|
||||
class CliHelper extends \Codeception\Module
|
||||
{
|
||||
public function _beforeSuite($settings = [])
|
||||
{
|
||||
$this->debug('Building actor classes for claypit');
|
||||
$this->getModule('Cli')->runShellCommand('php ' . codecept_root_dir() . 'codecept build -c ' . codecept_data_dir() . 'claypit');
|
||||
}
|
||||
|
||||
public function _before(\Codeception\TestInterface $test)
|
||||
{
|
||||
codecept_debug('creating dirs');
|
||||
$this->getModule('Filesystem')->copyDir(codecept_data_dir() . 'claypit', codecept_data_dir() . 'sandbox');
|
||||
}
|
||||
|
||||
public function _after(\Codeception\TestInterface $test)
|
||||
{
|
||||
codecept_debug('deleting dirs');
|
||||
$this->getModule('Filesystem')->deleteDir(codecept_data_dir() . 'sandbox');
|
||||
chdir(\Codeception\Configuration::projectDir());
|
||||
}
|
||||
|
||||
public function executeCommand($command, $fail = true)
|
||||
{
|
||||
$this->getModule('Cli')->runShellCommand('php ' . \Codeception\Configuration::projectDir() . 'codecept ' . $command . ' -n', $fail);
|
||||
}
|
||||
|
||||
public function executeFailCommand($command)
|
||||
{
|
||||
$this->getModule('Cli')->runShellCommand('php '.\Codeception\Configuration::projectDir().'codecept '.$command.' -n', false);
|
||||
}
|
||||
|
||||
public function seeDirFound($dir)
|
||||
{
|
||||
$this->assertTrue(is_dir($dir) && file_exists($dir), "Directory does not exist");
|
||||
}
|
||||
}
|
||||
26
vendor/codeception/base/tests/support/CodeGuy.php
vendored
Normal file
26
vendor/codeception/base/tests/support/CodeGuy.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* 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 CodeGuy extends \Codeception\Actor
|
||||
{
|
||||
use _generated\CodeGuyActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
}
|
||||
8
vendor/codeception/base/tests/support/CodeHelper.php
vendored
Normal file
8
vendor/codeception/base/tests/support/CodeHelper.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom functions for CodeGuy
|
||||
|
||||
class CodeHelper extends \Codeception\Module
|
||||
{
|
||||
}
|
||||
35
vendor/codeception/base/tests/support/CoverGuy.php
vendored
Normal file
35
vendor/codeception/base/tests/support/CoverGuy.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* 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 CoverGuy extends \Codeception\Actor
|
||||
{
|
||||
use _generated\CoverGuyActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
public function seeCoverageStatsNotEmpty()
|
||||
{
|
||||
$this->seeInShellOutput(
|
||||
<<<EOF
|
||||
info
|
||||
Methods: 100.00% ( 1/ 1) Lines: 100.00% ( 4/ 4)
|
||||
EOF
|
||||
);
|
||||
}
|
||||
}
|
||||
6
vendor/codeception/base/tests/support/CoverHelper.php
vendored
Normal file
6
vendor/codeception/base/tests/support/CoverHelper.php
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
class CoverHelper extends \Codeception\Module
|
||||
{
|
||||
}
|
||||
25
vendor/codeception/base/tests/support/EmulateModuleHelper.php
vendored
Normal file
25
vendor/codeception/base/tests/support/EmulateModuleHelper.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom functions for CodeGuy
|
||||
|
||||
class EmulateModuleHelper extends \Codeception\Module
|
||||
{
|
||||
public $assertions = 0;
|
||||
|
||||
public function seeEquals($expected, $actual)
|
||||
{
|
||||
\PHPUnit_Framework_Assert::assertEquals($expected, $actual);
|
||||
$this->assertions++;
|
||||
}
|
||||
|
||||
public function seeFeaturesEquals($expected)
|
||||
{
|
||||
\PHPUnit_Framework_Assert::assertEquals($expected, $this->feature);
|
||||
}
|
||||
|
||||
public function _before(\Codeception\TestInterface $test)
|
||||
{
|
||||
$this->feature = $test->getMetadata()->getFeature();
|
||||
}
|
||||
}
|
||||
26
vendor/codeception/base/tests/support/FacebookGuy.php
vendored
Normal file
26
vendor/codeception/base/tests/support/FacebookGuy.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* 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 \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class FacebookGuy extends \Codeception\Actor
|
||||
{
|
||||
use _generated\FacebookGuyActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
}
|
||||
10
vendor/codeception/base/tests/support/Helper/Angular.php
vendored
Normal file
10
vendor/codeception/base/tests/support/Helper/Angular.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class Angular extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
||||
6
vendor/codeception/base/tests/support/Helper/Shire.php
vendored
Normal file
6
vendor/codeception/base/tests/support/Helper/Shire.php
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
|
||||
class Shire extends \Codeception\Module
|
||||
{
|
||||
}
|
||||
25
vendor/codeception/base/tests/support/Shire/Codeception/Module/EmulateModuleHelper.php
vendored
Normal file
25
vendor/codeception/base/tests/support/Shire/Codeception/Module/EmulateModuleHelper.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Shire\Codeception\Module;
|
||||
|
||||
// here you can define custom functions for CodeGuy
|
||||
|
||||
class EmulateModuleHelper extends \Codeception\Module
|
||||
{
|
||||
public $assertions = 0;
|
||||
|
||||
public function seeEquals($expected, $actual)
|
||||
{
|
||||
\PHPUnit_Framework_Assert::assertEquals($expected, $actual);
|
||||
$this->assertions++;
|
||||
}
|
||||
|
||||
public function seeFeaturesEquals($expected)
|
||||
{
|
||||
\PHPUnit_Framework_Assert::assertEquals($expected, $this->scenario->getFeature());
|
||||
}
|
||||
|
||||
public function _before(\Codeception\TestInterface $test)
|
||||
{
|
||||
$this->scenario = $test->getScenario();
|
||||
}
|
||||
}
|
||||
9
vendor/codeception/base/tests/support/TestHelper.php
vendored
Normal file
9
vendor/codeception/base/tests/support/TestHelper.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom functions for TestGuy
|
||||
|
||||
class TestHelper extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
||||
17
vendor/codeception/base/tests/support/UniversalFramework.php
vendored
Normal file
17
vendor/codeception/base/tests/support/UniversalFramework.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
class UniversalFramework extends \Codeception\Lib\Framework
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$index = '/app/index.php';
|
||||
$this->client = new \Codeception\Lib\Connector\Universal();
|
||||
$this->client->setIndex(\Codeception\Configuration::dataDir().$index);
|
||||
}
|
||||
|
||||
public function useUniversalFramework()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
26
vendor/codeception/base/tests/support/WebGuy.php
vendored
Normal file
26
vendor/codeception/base/tests/support/WebGuy.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* 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 \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class WebGuy extends \Codeception\Actor
|
||||
{
|
||||
use _generated\WebGuyActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
}
|
||||
12
vendor/codeception/base/tests/support/WebHelper.php
vendored
Normal file
12
vendor/codeception/base/tests/support/WebHelper.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom functions for WebGuy
|
||||
|
||||
class WebHelper extends \Codeception\Module
|
||||
{
|
||||
public function changeBrowser($browser)
|
||||
{
|
||||
$this->getModule('WebDriver')->_restart(['browser' => $browser]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user