Skip to content

Commit 178bef2

Browse files
justinyostbeporter
authored andcommitted
Adds Basic Test Setup And Files
Signed-off-by: Justin Yost <justin.yost@yostivanich.com>
1 parent 4b4754b commit 178bef2

4 files changed

Lines changed: 135 additions & 1 deletion

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Custom test suite to execute all ConfigRead Plugin Command tests.
4+
*
5+
* @package ConfigRead.Test.Case
6+
*/
7+
8+
/**
9+
* AllConfigReadCommandTest
10+
*/
11+
class AllConfigReadCommandTest extends PHPUnit_Framework_TestSuite {
12+
13+
/**
14+
* load the suites
15+
*
16+
* @return CakeTestSuite
17+
*/
18+
public static function suite() {
19+
$suite = new CakeTestSuite('All ConfigRead Plugin Command Tests');
20+
$suite->addTestDirectoryRecursive(dirname(__FILE__) . '/Console/Command/');
21+
return $suite;
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Custom test suite to execute all ConfigRead Plugin Console tests.
4+
*
5+
* @package ConfigRead.Test.Case
6+
*/
7+
8+
/**
9+
* AllConfigReadConsoleTest
10+
*/
11+
class AllConfigReadConsoleTest extends PHPUnit_Framework_TestSuite {
12+
13+
/**
14+
* load the suites
15+
*
16+
* @return CakeTestSuite
17+
*/
18+
public static function suite() {
19+
$suite = new CakeTestSuite('All ConfigRead Plugin Console Tests');
20+
$suite->addTestDirectoryRecursive(dirname(__FILE__) . '/Console/');
21+
return $suite;
22+
}
23+
}

Test/Case/AllConfigReadTest.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Custom test suite to execute all ConfigRead Plugin tests.
4+
*
5+
* @package ConfigRead.Test.Case
6+
*/
7+
8+
/**
9+
* AllConfigReadTest
10+
*/
11+
class AllConfigReadTest extends PHPUnit_Framework_TestSuite {
12+
13+
/**
14+
* the suites to load
15+
*
16+
* @var array
17+
*/
18+
public static $suites = array(
19+
// Console Folder
20+
'AllConfigReadConsoleTest.php',
21+
'AllConfigReadCommandTest.php',
22+
);
23+
24+
/**
25+
* load the suites
26+
*
27+
* @return CakeTestSuite
28+
*/
29+
public static function suite() {
30+
$path = dirname(__FILE__) . '/';
31+
$suite = new CakeTestSuite('All Tests');
32+
33+
foreach (self::$suites as $file) {
34+
if (is_readable($path . $file)) {
35+
$suite->addTestFile($path . $file);
36+
}
37+
}
38+
return $suite;
39+
}
40+
41+
}
Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
11
<?php
2-
//@TODO
2+
/**
3+
* Class to test the ConfigReadShell methods
4+
*
5+
* @package ConfigRead.Test.Case.Console.Command
6+
*/
7+
App::uses('ConfigReadShell', 'ConfigRead.Console/Command');
8+
9+
/**
10+
* ConfigReadShellTest
11+
*/
12+
class ConfigReadShellTest extends CakeTestCase {
13+
14+
/**
15+
* Fixtures
16+
*
17+
* @var array
18+
*/
19+
public $fixtures = array(
20+
);
21+
22+
/**
23+
* setUp method
24+
*
25+
* @return void
26+
*/
27+
public function setUp() {
28+
parent::setUp();
29+
}
30+
31+
/**
32+
* tearDown method
33+
*
34+
* @return void
35+
*/
36+
public function tearDown() {
37+
parent::tearDown();
38+
}
39+
40+
/**
41+
* mark tests as incomplete for the plugin
42+
*
43+
* @return void
44+
*/
45+
public function testsIncomplete() {
46+
$this->markTestIncomplete("No tests implemented for ConfigReadShell.");
47+
}
48+
49+
}

0 commit comments

Comments
 (0)