forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added codeception and new test suite
Moved the Version unit test in codeception suite Added getParts and constants in the Version component
- Loading branch information
Showing
20 changed files
with
2,726 additions
and
39 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// This is global bootstrap for autoloading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Replace this file with actual dump of your database */ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
namespace Codeception; | ||
|
||
use \PHPUnit_Framework_Assert as a; | ||
|
||
class Verify | ||
{ | ||
|
||
protected $actual = null; | ||
protected $description = ''; | ||
|
||
public function __construct($description, $actual = null) | ||
{ | ||
if (!$actual) { | ||
$this->actual = $description; | ||
} else { | ||
$this->actual = $actual; | ||
$this->description = $description; | ||
} | ||
} | ||
|
||
public function equals($expected) | ||
{ | ||
a::assertEquals($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function notEquals($expected) | ||
{ | ||
a::assertNotEquals($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function contains($needle) | ||
{ | ||
a::assertContains($needle, $this->actual, $this->description); | ||
} | ||
|
||
public function notContains($needle) | ||
{ | ||
a::assertNotContains($needle, $this->actual, $this->description); | ||
} | ||
|
||
public function greaterThan($expected) | ||
{ | ||
a::assertGreaterThan($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function lessThen($expected) | ||
{ | ||
a::assertLessThan($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function greaterOrEquals($expected) | ||
{ | ||
a::assertGreaterThanOrEqual($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function lessOrEquals($expected) | ||
{ | ||
a::assertLessThanOrEqual($expected, $this->actual, $this->description); | ||
} | ||
|
||
public function true() | ||
{ | ||
a::assertTrue($this->actual, $this->description); | ||
} | ||
|
||
public function false() | ||
{ | ||
a::assertFalse($this->actual, $this->description); | ||
} | ||
|
||
public function null() | ||
{ | ||
a::assertNull($this->actual, $this->description); | ||
} | ||
|
||
public function notNull() | ||
{ | ||
a::assertNotNull($this->actual, $this->description); | ||
} | ||
|
||
public function isEmpty() | ||
{ | ||
a::assertEmpty($this->actual, $this->description); | ||
} | ||
|
||
public function notEmpty() | ||
{ | ||
a::assertNotEmpty($this->actual, $this->description); | ||
} | ||
|
||
public function hasKey($key) | ||
{ | ||
a::assertArrayHasKey($key, $this->actual, $this->description); | ||
} | ||
|
||
public function hasntKey($key) | ||
{ | ||
a::assertArrayNotHasKey($key, $this->actual, $this->description); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/' |
Oops, something went wrong.