init
This commit is contained in:
12
vendor/codeception/base/tests/unit/Codeception/Step/ConditionalAssertionTest.php
vendored
Normal file
12
vendor/codeception/base/tests/unit/Codeception/Step/ConditionalAssertionTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use \Codeception\Step\ConditionalAssertion;
|
||||
|
||||
class ConditionalAssertionTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function testCantSeeToString()
|
||||
{
|
||||
$assertion = new ConditionalAssertion('dontSee', ['text']);
|
||||
$this->assertEquals('cant see "text"', $assertion->toString(200));
|
||||
}
|
||||
}
|
||||
30
vendor/codeception/base/tests/unit/Codeception/Step/ExecutorTest.php
vendored
Normal file
30
vendor/codeception/base/tests/unit/Codeception/Step/ExecutorTest.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
class ExecutorTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider valuesProvider
|
||||
*/
|
||||
public function testRun($returnValue)
|
||||
{
|
||||
$expected = $returnValue;
|
||||
|
||||
$executor = new \Codeception\Step\Executor(function () use ($returnValue) {
|
||||
return $returnValue;
|
||||
});
|
||||
$actual = $executor->run();
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function valuesProvider()
|
||||
{
|
||||
return array(
|
||||
array(true),
|
||||
array(false),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user