Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike
authored and
Mike
committed
May 7, 2010
1 parent
5eb61eb
commit 68973e9
Showing
12 changed files
with
145 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
Empty file.
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 |
---|---|---|
@@ -1,11 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> | ||
<coverage xmlns="http://www.netbeans.org/ns/code-coverage/1" enabled="true"/> | ||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> | ||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1"> | ||
<file>file:/Users/mike/NetBeansProjects/FORM/README</file> | ||
<file>file:/Users/mike/NetBeansProjects/FORM/lib/FORM/FormManager.php</file> | ||
<file>file:/Users/mike/NetBeansProjects/FORM/lib/FORM/FormRepository.php</file> | ||
<file>file:/Users/mike/NetBeansProjects/FORM/lib/FORM/Mapping/MetadataFactory.php</file> | ||
<file>file:/Users/mike/NetBeansProjects/FORM/lib/FORM/Configuration.php</file> | ||
</open-files> | ||
</project-private> |
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
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,28 @@ | ||
<?php | ||
|
||
namespace Test\FORM; | ||
|
||
if (!defined('PHPUnit_MAIN_METHOD')) { | ||
define('PHPUnit_MAIN_METHOD', 'FORM_AllTests::main'); | ||
} | ||
|
||
require_once __DIR__ . '/../Init.php'; | ||
|
||
class AllTests | ||
{ | ||
public static function main() | ||
{ | ||
\PHPUnit_TextUI_TestRunner::run(self::suite()); | ||
} | ||
|
||
public static function suite() | ||
{ | ||
$suite = new \Test\FORMTestSuite('FORM Functional Tests'); | ||
|
||
return $suite; | ||
} | ||
} | ||
|
||
if (PHPUnit_MAIN_METHOD == 'Functional_AllTests::main') { | ||
AllTests::main(); | ||
} |
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,37 @@ | ||
<?php | ||
|
||
namespace Test\FORM; | ||
|
||
require_once __DIR__ . '/../Init.php'; | ||
|
||
class FormManagerTest extends \Test\FORMTestCase | ||
{ | ||
/** | ||
* @var FormManager | ||
*/ | ||
protected $_fm; | ||
|
||
protected $_em; | ||
protected $_config; | ||
|
||
public function setUp() | ||
{ | ||
parent::setUp(); | ||
$this->_em = $this->_getTestEntityManager(); | ||
$this->_config = new \FORM\Configuration(); | ||
$this->_fm = new \FORM\FormManager($this->_em, $this->_config); | ||
} | ||
|
||
public function testConstructor() | ||
{ | ||
$this->assertEquals($this->_em, $this->_fm->getEntityManager()); | ||
$this->assertEquals($this->_config, $this->_fm->getConfiguration()); | ||
} | ||
|
||
public function testGetRepository() | ||
{ | ||
$repository = $this->_fm->getRepository('Test'); | ||
$this->assertEquals('FORM\FormRepository', get_class($repository)); | ||
$this->assertEquals($this->_em, $repository->getEntityManager()); | ||
} | ||
} |
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
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
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